From 13b07c1ae1c92c9b0a431576f6c78c95a46060fb Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 23 Nov 2010 10:44:55 +0100 Subject: empathy-av: early return if already activated Purely esthetic change to look more like empathy-chat.c --- src/empathy-av.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/empathy-av.c b/src/empathy-av.c index 5b46307cc..2313b22fc 100644 --- a/src/empathy-av.c +++ b/src/empathy-av.c @@ -72,29 +72,29 @@ new_call_handler_cb (EmpathyCallFactory *factory, static void activate_cb (GApplication *application) { - if (!activated) - { - GError *error = NULL; + GError *error = NULL; + + if (activated) + return; - if (!use_timer) - { - /* keep a 'ref' to the application */ - g_application_hold (G_APPLICATION (app)); - } + activated = TRUE; - g_assert (call_factory == NULL); - call_factory = empathy_call_factory_initialise (); + if (!use_timer) + { + /* keep a 'ref' to the application */ + g_application_hold (G_APPLICATION (app)); + } - g_signal_connect (G_OBJECT (call_factory), "new-call-handler", - G_CALLBACK (new_call_handler_cb), NULL); + g_assert (call_factory == NULL); + call_factory = empathy_call_factory_initialise (); - if (!empathy_call_factory_register (call_factory, &error)) - { - g_critical ("Failed to register Handler: %s", error->message); - g_error_free (error); - } + g_signal_connect (G_OBJECT (call_factory), "new-call-handler", + G_CALLBACK (new_call_handler_cb), NULL); - activated = TRUE; + if (!empathy_call_factory_register (call_factory, &error)) + { + g_critical ("Failed to register Handler: %s", error->message); + g_error_free (error); } } -- cgit v1.2.3