Check exception before getting. You save lots of warnings.
authorSrinivasa Ragavan <sragavan@novell.com>
Mon, 11 Aug 2008 06:21:43 +0000 (06:21 +0000)
committerSrinivasa Ragavan <sragavan@src.gnome.org>
Mon, 11 Aug 2008 06:21:43 +0000 (06:21 +0000)
2008-08-08  Srinivasa Ragavan  <sragavan@novell.com>

* camel/camel-folder-search.c: Check exception before getting. You
save lots of warnings.

svn path=/trunk/; revision=9304

camel/ChangeLog
camel/camel-folder-search.c

index afaadef..ce69b7f 100644 (file)
@@ -1,3 +1,8 @@
+2008-08-08  Srinivasa Ragavan  <sragavan@novell.com>
+
+       * camel/camel-folder-search.c: Check exception before getting. You
+       save lots of warnings.
+       
 2008-08-11  Sankar P  <psankar@novell.com>
 
        * camel-db.c (cdb_sql_exec), (camel_db_count_message_info),
index 40fea3e..5bdd674 100644 (file)
@@ -493,7 +493,7 @@ camel_folder_search_search(CamelFolderSearch *search, const char *expr, GPtrArra
                matches = g_ptr_array_new();
                cdb = (CamelDB *) (search->folder->cdb);
                camel_db_select (cdb, tmp, (CamelDBSelectCB) read_uid_callback, matches, ex);
-               if (camel_exception_is_set(ex)) {
+               if (ex && camel_exception_is_set(ex)) {
                        const char *exception = camel_exception_get_description (ex);
                        if (strncmp(exception, "no such table", 13) == 0) {
                                g_warning ("Error during searching %s: %s\n", tmp, exception);