From 6712c6baf3104853707a3ba73f57864063452ae5 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Fri, 30 Dec 2011 19:44:31 -0200 Subject: Do not create another server loop if one has been already created previously --- shell/callbacks.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'shell/callbacks.c') diff --git a/shell/callbacks.c b/shell/callbacks.c index 021560e2..88c85587 100644 --- a/shell/callbacks.c +++ b/shell/callbacks.c @@ -99,7 +99,9 @@ void cb_act_as_server() accepting = shell_action_get_active("ActAsServerAction"); if (accepting) { - server_loop = g_main_loop_new(NULL, FALSE); + if (!server_loop) { + server_loop = g_main_loop_new(NULL, FALSE); + } g_idle_add(server_start_helper, server_loop); } else { g_main_loop_quit(server_loop); -- cgit v1.2.3