From: Christian Persch Date: Tue, 20 Oct 2009 18:01:12 +0000 (+0200) Subject: shell: Don't crash when we don't have a DBUS connection X-Git-Tag: EVINCE_2_29_1~35 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=ba540cc933501c25ee8caddc9225b782e0fec8ae;p=evince.git 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. --- diff --git a/shell/ev-application.c b/shell/ev-application.c index 69a5a730..24ef1e09 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),