Only connect input output channel if socket was successfully created
This commit is contained in:
parent
427a482033
commit
974ba431d8
1 changed files with 6 additions and 3 deletions
|
@ -675,9 +675,12 @@ midori_app_create_instance (MidoriApp* app,
|
||||||
instance = socket_init (instance_name, sokoke_set_config_dir (NULL), &exists);
|
instance = socket_init (instance_name, sokoke_set_config_dir (NULL), &exists);
|
||||||
g_object_set_data (G_OBJECT (app), "sock-exists",
|
g_object_set_data (G_OBJECT (app), "sock-exists",
|
||||||
exists ? (gpointer)0xdeadbeef : NULL);
|
exists ? (gpointer)0xdeadbeef : NULL);
|
||||||
|
if (instance != MidoriAppInstanceNull)
|
||||||
|
{
|
||||||
channel = g_io_channel_unix_new (instance);
|
channel = g_io_channel_unix_new (instance);
|
||||||
g_io_add_watch (channel, G_IO_IN | G_IO_PRI | G_IO_ERR,
|
g_io_add_watch (channel, G_IO_IN | G_IO_PRI | G_IO_ERR,
|
||||||
(GIOFunc)midori_app_io_channel_watch_cb, app);
|
(GIOFunc)midori_app_io_channel_watch_cb, app);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_free (instance_name);
|
g_free (instance_name);
|
||||||
|
|
Loading…
Reference in a new issue