From ba540cc933501c25ee8caddc9225b782e0fec8ae Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Tue, 20 Oct 2009 18:01:12 +0000 Subject: shell: Don't crash when we don't have a DBUS connection When getting the DBUS fails, we don't create the applications->windows hash table, but were still looking things up in it. --- (limited to 'shell/ev-application.c') diff --git a/shell/ev-application.c b/shell/ev-application.c index 69a5a73..24ef1e0 100644 --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -667,7 +667,8 @@ ev_application_open_uri_in_window (EvApplication *application, ev_window_open_uri (ev_window, uri, dest, mode, search_string); #ifdef ENABLE_DBUS - if (!g_hash_table_lookup (application->windows, ev_window)) { + if (application->windows != NULL && + !g_hash_table_lookup (application->windows, ev_window)) { g_hash_table_insert (application->windows, ev_window, g_strdup (uri)); g_signal_connect_swapped (ev_window, "destroy", G_CALLBACK (ev_application_window_destroyed), -- cgit v0.9.1