summaryrefslogtreecommitdiff
path: root/ext/gtk
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2015-09-29 00:25:00 +1000
committerMatthew Waters <matthew@centricular.com>2015-09-29 00:27:30 +1000
commitda5c0bddb2c16ed9f9145809d4329c6419afd464 (patch)
tree39f89c9c1e4842b5de88ae0060c5a3b27782b7cf /ext/gtk
parenta198e55b318bcf4ac506a97d8c3d8ce936fca13c (diff)
downloadgstreamer-plugins-bad-da5c0bddb2c16ed9f9145809d4329c6419afd464.tar.gz
gtk: fix assertion when the element has no peer
When proxying keyboard/navigation/mouse events, only unref a successfully retreived peer pad. https://bugzilla.gnome.org/show_bug.cgi?id=755738
Diffstat (limited to 'ext/gtk')
-rw-r--r--ext/gtk/gstgtkbasesink.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/gtk/gstgtkbasesink.c b/ext/gtk/gstgtkbasesink.c
index e11627b5b..dd3af9101 100644
--- a/ext/gtk/gstgtkbasesink.c
+++ b/ext/gtk/gstgtkbasesink.c
@@ -276,10 +276,12 @@ gst_gtk_base_sink_navigation_send_event (GstNavigation * navigation,
GST_TRACE_OBJECT (sink, "navigation event %" GST_PTR_FORMAT, structure);
- if (GST_IS_PAD (pad) && GST_IS_EVENT (event))
- gst_pad_send_event (pad, event);
+ if (GST_IS_PAD (pad)) {
+ if (GST_IS_EVENT (event))
+ gst_pad_send_event (pad, event);
- gst_object_unref (pad);
+ gst_object_unref (pad);
+ }
}
static void