2007-06-06 Murray Cumming <murrayc@murrayc.come>
authorMurray Cumming <murrayc@murrayc.com>
Wed, 6 Jun 2007 11:18:33 +0000 (11:18 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Wed, 6 Jun 2007 11:18:33 +0000 (11:18 +0000)
* src/widgets/modest-folder-view.c: (update_model):
        Do not unref the treemodel before we have finished with it.
        This prevents a valgrind warning and an occasional crash at startup.

pmo-trunk-r2077

ChangeLog2
src/widgets/modest-folder-view.c

index bfc4c1f..5517d40 100644 (file)
@@ -1,4 +1,9 @@
+2007-06-06  Murray Cumming  <murrayc@murrayc.come>
 
+       * src/widgets/modest-folder-view.c: (update_model):
+       Do not unref the treemodel before we have finished with it.
+       This prevents a valgrind warning and an occasional crash at startup.
+       
 2007-06-06  Marcus Bauer  <marcusb@openismus.com>
 
        * libmodest-dbus-client/libmodest-dbus-client.h:
index 523873b..0e35b8d 100644 (file)
@@ -742,9 +742,6 @@ update_model (ModestFolderView *self, ModestTnyAccountStore *account_store)
        tny_account_store_get_accounts (TNY_ACCOUNT_STORE(account_store),
                                        model_as_list,
                                        TNY_ACCOUNT_STORE_STORE_ACCOUNTS);
-       
-       
-       g_object_unref (model_as_list);
        model_as_list = NULL;   
        
        /*      
@@ -776,6 +773,14 @@ update_model (ModestFolderView *self, ModestTnyAccountStore *account_store)
                                 (filter_model) ? filter_model : sortable);
        expand_root_items (self); /* expand all account folders */
        
+       
+       g_object_unref (model);
+       
+       if (filter_model)
+                       g_object_unref (filter_model);
+                       
+       g_object_unref (sortable);
+                       
        return TRUE;
 }