/* Create and show the dialog */
if (proto && MODEST_IS_ACCOUNT_PROTOCOL (proto)) {
- GtkWindow *parent;
- ModestWindowMgr *mgr = modest_runtime_get_window_mgr ();
ModestAccountSettingsDialog *dialog =
modest_account_protocol_get_account_settings_dialog (proto, modest_account_name);
- parent = modest_window_mgr_get_modal (mgr);
- if (!parent)
- parent = (GtkWindow *) modest_window_mgr_get_current_top (mgr);
+ if (dialog) {
+ ModestWindowMgr *mgr = modest_runtime_get_window_mgr ();
+ GtkWindow *parent = modest_window_mgr_get_modal (mgr);
+ if (!parent)
+ parent = (GtkWindow *) modest_window_mgr_get_current_top (mgr);
- modest_window_mgr_set_modal (mgr, GTK_WINDOW (dialog), parent);
- gtk_widget_show (GTK_WIDGET (dialog));
+ modest_window_mgr_set_modal (mgr, GTK_WINDOW (dialog), parent);
+ gtk_widget_show (GTK_WIDGET (dialog));
+ }
}
}
/* Show an explanatory temporary banner: */
TnyLockable *lockable;
GnomeVFSVolumeMonitor* monitor = NULL;
gboolean auto_update;
+ const gchar *mmc_path = NULL;
g_return_val_if_fail (account_mgr, NULL);
g_return_val_if_fail (device, NULL);
add_connection_specific_transport_accounts (MODEST_TNY_ACCOUNT_STORE(obj));
/* This is a singleton, so it does not need to be unrefed. */
- if (volume_path_is_mounted (g_getenv (MODEST_MMC1_VOLUMEPATH_ENV))) {
+ mmc_path = g_getenv (MODEST_MMC1_VOLUMEPATH_ENV);
+ if (mmc_path && volume_path_is_mounted (mmc_path)) {
/* It is mounted: */
add_mmc_account (MODEST_TNY_ACCOUNT_STORE (obj), FALSE /* don't emit the insert signal. */);
}