aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-11-03 23:59:05 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-11-03 23:59:05 +0800
commit257e5241380c49fb5498093ccf3ebcced29c7fe1 (patch)
treeb8ea87581e840680fe0808606d7b04eaddd18eab
parentc3395bb565cc994f4871f52d20e4be506c75d6e8 (diff)
parent6780c24c52863706602cf0b900ba4adc298180fe (diff)
downloadgsoc2013-empathy-257e5241380c49fb5498093ccf3ebcced29c7fe1.tar
gsoc2013-empathy-257e5241380c49fb5498093ccf3ebcced29c7fe1.tar.gz
gsoc2013-empathy-257e5241380c49fb5498093ccf3ebcced29c7fe1.tar.bz2
gsoc2013-empathy-257e5241380c49fb5498093ccf3ebcced29c7fe1.tar.lz
gsoc2013-empathy-257e5241380c49fb5498093ccf3ebcced29c7fe1.tar.xz
gsoc2013-empathy-257e5241380c49fb5498093ccf3ebcced29c7fe1.tar.zst
gsoc2013-empathy-257e5241380c49fb5498093ccf3ebcced29c7fe1.zip
Merge branch 'av-crash-633816'
-rw-r--r--src/empathy-av.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/empathy-av.c b/src/empathy-av.c
index 6a4688231..f6d1f5268 100644
--- a/src/empathy-av.c
+++ b/src/empathy-av.c
@@ -47,6 +47,8 @@ static GtkApplication *app = NULL;
static gboolean activated = FALSE;
static gboolean use_timer = TRUE;
+static EmpathyCallFactory *call_factory = NULL;
+
static void
new_call_handler_cb (EmpathyCallFactory *factory,
EmpathyCallHandler *handler,
@@ -72,12 +74,12 @@ activate_cb (GApplication *application)
{
if (!use_timer && !activated)
{
- EmpathyCallFactory *call_factory;
GError *error = NULL;
/* keep a 'ref' to the application */
g_application_hold (G_APPLICATION (app));
+ g_assert (call_factory == NULL);
call_factory = empathy_call_factory_initialise ();
g_signal_connect (G_OBJECT (call_factory), "new-call-handler",
@@ -90,8 +92,6 @@ activate_cb (GApplication *application)
}
activated = TRUE;
-
- g_object_unref (call_factory);
}
}
@@ -158,6 +158,7 @@ main (int argc,
retval = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
+ tp_clear_object (&call_factory);
#ifdef ENABLE_DEBUG
g_object_unref (debug_sender);