aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-nm.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shell-nm.c')
-rw-r--r--shell/e-shell-nm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/shell/e-shell-nm.c b/shell/e-shell-nm.c
index de06ed2d8a..d973a26b22 100644
--- a/shell/e-shell-nm.c
+++ b/shell/e-shell-nm.c
@@ -64,11 +64,17 @@ e_shell_network_monitor (DBusConnection *connection G_GNUC_UNUSED,
DBusError error;
const char *object;
ShellLineStatus status;
- EShellWindow *window = E_SHELL_WINDOW (user_data);
- EShell *shell = e_shell_window_peek_shell ((EShellWindow *) user_data);
+ EShellWindow *window = NULL;
+ EShell *shell = NULL;
GNOME_Evolution_ShellState shell_state;
EShellLineStatus line_status;
+ if (!user_data || !E_IS_SHELL_WINDOW (user_data))
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+
+ window = E_SHELL_WINDOW (user_data);
+ shell = e_shell_window_peek_shell (window);
+
dbus_error_init (&error);
object = dbus_message_get_path (message);