aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmanuele Aina <emanuele.aina@collabora.com>2012-03-15 00:00:10 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-03-16 18:48:31 +0800
commit7b12eea87d880aa47f7fac77c1a0c0c23cd91330 (patch)
tree2c3848bcff491e43cbbff9eb1521e72e9c2795cd /src
parent0ff55aa0c6da02366bad86469d431b2b09963170 (diff)
downloadgsoc2013-empathy-7b12eea87d880aa47f7fac77c1a0c0c23cd91330.tar
gsoc2013-empathy-7b12eea87d880aa47f7fac77c1a0c0c23cd91330.tar.gz
gsoc2013-empathy-7b12eea87d880aa47f7fac77c1a0c0c23cd91330.tar.bz2
gsoc2013-empathy-7b12eea87d880aa47f7fac77c1a0c0c23cd91330.tar.lz
gsoc2013-empathy-7b12eea87d880aa47f7fac77c1a0c0c23cd91330.tar.xz
gsoc2013-empathy-7b12eea87d880aa47f7fac77c1a0c0c23cd91330.tar.zst
gsoc2013-empathy-7b12eea87d880aa47f7fac77c1a0c0c23cd91330.zip
Fix crash on hangup with no video
Insufficient refcount on priv->video_preview_sink caused segfaults when accessing freed data. https://bugzilla.gnome.org/show_bug.cgi?id=672063
Diffstat (limited to 'src')
-rw-r--r--src/empathy-call-window.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 565b9edca..10333d6c3 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -1082,9 +1082,9 @@ create_video_preview (EmpathyCallWindow *self)
priv->video_preview_sink = gst_element_factory_make ("cluttersink", NULL);
if (priv->video_preview_sink == NULL)
- g_error ("Missing cluttersink");
- else
- g_object_set (priv->video_preview_sink, "texture", preview, NULL);
+ g_error ("Missing cluttersink, check your clutter-gst installation");
+ g_object_set (priv->video_preview_sink, "texture", preview, NULL);
+ g_object_add_weak_pointer (G_OBJECT (priv->video_preview_sink), (gpointer) &priv->video_preview_sink);
/* Add a little offset to the video preview */
layout = clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_CENTER,
@@ -3626,7 +3626,8 @@ empathy_call_window_bus_message (GstBus *bus, GstMessage *message,
start_call (self);
}
}
- if (GST_MESSAGE_SRC (message) == GST_OBJECT (priv->video_preview_sink))
+ if (priv->video_preview_sink != NULL &&
+ GST_MESSAGE_SRC (message) == GST_OBJECT (priv->video_preview_sink))
{
gst_message_parse_state_changed (message, NULL, &newstate,
&pending);