Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-application.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2009-10-20 18:01:12 (GMT)
committer Christian Persch <chpe@gnome.org>2009-10-20 18:01:12 (GMT)
commitba540cc933501c25ee8caddc9225b782e0fec8ae (patch)
tree29cfba43ea877f519563e633ce9f8a306228c021 /shell/ev-application.c
parentebcb31119d3e0fcb586cc36ee1e94b12dcd40bb0 (diff)
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.
Diffstat (limited to 'shell/ev-application.c')
-rw-r--r--shell/ev-application.c3
1 files changed, 2 insertions, 1 deletions
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),