X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fhildon2%2Fmodest-account-view-window.c;h=5f3eeb0e153c658e105777d1f8a4e06cff9742dd;hb=1ad54969b11f4b8598afe3f33246f0178d6c35ac;hp=5253bccef12ca2cf3f4a0f239ba8acebcfd9fac6;hpb=ae06a114724e713c7cc743f8ea792ca91f65c4d4;p=modest diff --git a/src/hildon2/modest-account-view-window.c b/src/hildon2/modest-account-view-window.c index 5253bcc..5f3eeb0 100644 --- a/src/hildon2/modest-account-view-window.c +++ b/src/hildon2/modest-account-view-window.c @@ -140,20 +140,20 @@ on_account_settings_dialog_response (GtkDialog *dialog, store_account = modest_tny_account_store_get_server_account (modest_runtime_get_account_store (), account_name, TNY_ACCOUNT_TYPE_STORE); - - /* Reconnect the store account, no need to reconnect the - transport account because it will connect when needed */ - if (tny_account_get_connection_status (store_account) == - TNY_CONNECTION_STATUS_DISCONNECTED) - tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (store_account), - TRUE, NULL, NULL); - + if (store_account) { + /* Reconnect the store account, no need to reconnect the + transport account because it will connect when needed */ + if (tny_account_get_connection_status (store_account) == + TNY_CONNECTION_STATUS_DISCONNECTED) + tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (store_account), + TRUE, NULL, NULL); + g_object_unref (store_account); + } /* Disconnect this handler */ g_signal_handlers_disconnect_by_func (dialog, on_account_settings_dialog_response, user_data); /* Free */ g_free (account_name); - g_object_unref (store_account); } static void