2007-07-24 Murray Cumming <murrayc@murrayc.com>
+ * src/maemo/modest-maemo-global-settings-dialog.c:
+ (current_connection):
+ Avoid a crash (probably only in scratchbox) when strcmp()ing a
+ NULL when closing the dialog.
+
+2007-07-24 Murray Cumming <murrayc@murrayc.com>
+
* src/dbus_api/modest-dbus-callbacks.c: (on_idle_delete_message):
Remove the hacky send/receive that didn't work, and instead
refilter the treemodel to make the deleted email really vanish from
static gint on_send_receive(GArray * arguments, gpointer data, osso_rpc_t * retval)
{
+ printf("DEBUG: modest: %s\n", __FUNCTION__);
/* Use g_idle to context-switch into the application's thread: */
/* This method has no arguments. */
static ModestConnectedVia
current_connection (void)
{
- TnyAccountStore *account_store;
- TnyDevice *device;
+ TnyAccountStore *account_store = NULL;
+ TnyDevice *device = NULL;
ModestConnectedVia retval = MODEST_CONNECTED_VIA_ANY;
account_store = TNY_ACCOUNT_STORE (modest_runtime_get_account_store ());
ConIcIap *iap = tny_maemo_conic_device_get_iap (
TNY_MAEMO_CONIC_DEVICE (device), iap_id);
const gchar *bearer_type = con_ic_iap_get_bearer_type (iap);
-
- if (!strcmp (bearer_type, CON_IC_BEARER_WLAN_INFRA) ||
- !strcmp (bearer_type, CON_IC_BEARER_WLAN_ADHOC))
- retval = MODEST_CONNECTED_VIA_WLAN;
- else
- retval = MODEST_CONNECTED_VIA_ANY;
+ if (bearer_type) {
+ if (!strcmp (bearer_type, CON_IC_BEARER_WLAN_INFRA) ||
+ !strcmp (bearer_type, CON_IC_BEARER_WLAN_ADHOC))
+ retval = MODEST_CONNECTED_VIA_WLAN;
+ else
+ retval = MODEST_CONNECTED_VIA_ANY;
+ }
g_object_unref (iap);
}
+
g_object_unref (device);
return retval;