-
- /* 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);
+ }