aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-av.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/empathy-av.c')
-rw-r--r--src/empathy-av.c36
1 files 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);
}
}