From: Murray Cumming Date: Mon, 9 Jul 2007 21:26:20 +0000 (+0000) Subject: 2007-07-09 Murray Cumming X-Git-Tag: git_migration_finished~2879 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=1b52c5dd81842a24656dd9d1c0757e0cb3c797de 2007-07-09 Murray Cumming * src/modest-ui-actions.c: (modest_ui_actions_on_send_receive): Do not try to unref a NULL folder store, to avoid a runtime warning. This seems to happen sometimes when changing accounts settings. pmo-trunk-r2659 --- diff --git a/ChangeLog2 b/ChangeLog2 index 5f3ea22..84fe310 100644 --- a/ChangeLog2 +++ b/ChangeLog2 @@ -1,5 +1,11 @@ 2007-07-09 Murray Cumming + * src/modest-ui-actions.c: (modest_ui_actions_on_send_receive): + Do not try to unref a NULL folder store, to avoid a runtime warning. + This seems to happen sometimes when changing accounts settings. + +2007-07-09 Murray Cumming + * src/modest-tny-account-store.c: (modest_tny_account_store_instance_init), (modest_tny_account_store_finalize), diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index c398167..4710014 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -1487,7 +1487,7 @@ modest_ui_actions_on_send_receive (GtkAction *action, ModestWindow *win) folder_store = modest_folder_view_get_selected (MODEST_FOLDER_VIEW (folder_view)); - if (TNY_IS_FOLDER (folder_store)) { + if (folder_store && TNY_IS_FOLDER (folder_store)) { header_view = modest_main_window_get_child_widget (MODEST_MAIN_WINDOW (win), MODEST_WIDGET_TYPE_HEADER_VIEW); @@ -1501,7 +1501,9 @@ modest_ui_actions_on_send_receive (GtkAction *action, ModestWindow *win) folder_refreshed_cb, MODEST_MAIN_WINDOW (win)); } - g_object_unref (folder_store); + + if (folder_store) + g_object_unref (folder_store); } /* Refresh the active account */