From: Dirk-Jan C. Binnema Date: Wed, 13 Feb 2008 20:02:12 +0000 (+0000) Subject: * fix for a rare crash; fixes NB#80616. X-Git-Tag: git_migration_finished~1681 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=10d154d318a878e84fca75c550df264f78561ec9;ds=sidebyside * fix for a rare crash; fixes NB#80616. it's debatable whether this bug was not already fixed by the send-queue fixes done before; but as this crash was seen with W06, there *might* still be a problem. so, fixing the symptom here. not sure what led to the crash, but it should not happen anymore. pmo-trunk-r4173 --- diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index 5e9bb8d..6fbc996 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -1348,8 +1348,8 @@ modest_tny_account_store_get_server_account (ModestTnyAccountStore *self, } TnyAccount* -modest_tny_account_store_get_smtp_specific_transport_account_for_open_connection (ModestTnyAccountStore *self, - const gchar *account_name) +modest_tny_account_store_get_smtp_specific_transport_account_for_open_connection ( + ModestTnyAccountStore *self, const gchar *account_name) { TnyDevice *device; @@ -1358,7 +1358,12 @@ modest_tny_account_store_get_smtp_specific_transport_account_for_open_connection /* Get the current connection: */ device = modest_runtime_get_device (); - + + if (!device) { + g_warning ("%s: could not get device", __FUNCTION__); + return NULL; + } + if (!tny_device_is_online (device)) return NULL;