[Xfce4-commits] <midori:master> Only connect input output channel if socket was successfully created
Christian Dywan
noreply at xfce.org
Thu Nov 19 23:44:03 CET 2009
Updating branch refs/heads/master
to 974ba431d813dea557179a21a02e6084a5b7c4db (commit)
from 427a482033d6c8d4911dbea02add1f1ab0174c6e (commit)
commit 974ba431d813dea557179a21a02e6084a5b7c4db
Author: Christian Dywan <christian at twotoasts.de>
Date: Thu Nov 19 23:34:13 2009 +0100
Only connect input output channel if socket was successfully created
midori/midori-app.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/midori/midori-app.c b/midori/midori-app.c
index b9e4971..434e346 100644
--- a/midori/midori-app.c
+++ b/midori/midori-app.c
@@ -675,9 +675,12 @@ midori_app_create_instance (MidoriApp* app,
instance = socket_init (instance_name, sokoke_set_config_dir (NULL), &exists);
g_object_set_data (G_OBJECT (app), "sock-exists",
exists ? (gpointer)0xdeadbeef : NULL);
- channel = g_io_channel_unix_new (instance);
- g_io_add_watch (channel, G_IO_IN | G_IO_PRI | G_IO_ERR,
- (GIOFunc)midori_app_io_channel_watch_cb, app);
+ if (instance != MidoriAppInstanceNull)
+ {
+ channel = g_io_channel_unix_new (instance);
+ g_io_add_watch (channel, G_IO_IN | G_IO_PRI | G_IO_ERR,
+ (GIOFunc)midori_app_io_channel_watch_cb, app);
+ }
#endif
g_free (instance_name);
More information about the Xfce4-commits
mailing list