* leak fix (modest-init)
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 26 Jun 2007 18:03:58 +0000 (18:03 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 26 Jun 2007 18:03:58 +0000 (18:03 +0000)
* modest-main: sometimes, 'ui' was a not a valid gobject, which caused glib warnings

pmo-trunk-r2440

src/modest-init.c
src/modest-main.c

index 706c0e4..b805bff 100644 (file)
@@ -304,6 +304,7 @@ save_header_settings (ModestConf *conf, TnyFolderType type,
         * there was nothing before */
        if (!overwrite &&  modest_conf_key_exists(conf, key, NULL)) {
                g_free (key);
+               g_free (sort_key);
                return TRUE;
        }
 
index 0682b88..82c4385 100644 (file)
@@ -150,7 +150,7 @@ main (int argc, char *argv[])
                        GtkWidget *ui = NULL;
                        retval = start_ui (account_or_default,
                                           mailto, cc, bcc, subject, body, &ui);
-                       if (ui) 
+                       if (G_IS_OBJECT(ui))    
                                g_signal_connect (G_OBJECT (ui), "show", G_CALLBACK(on_show), NULL);
                }
        } else {