mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
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
This commit is contained in:
parent
16fe5f43c0
commit
38e30dc631
1 changed files with 5 additions and 3 deletions
|
@ -276,11 +276,13 @@ 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))
|
||||
if (GST_IS_PAD (pad)) {
|
||||
if (GST_IS_EVENT (event))
|
||||
gst_pad_send_event (pad, event);
|
||||
|
||||
gst_object_unref (pad);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gst_gtk_base_sink_navigation_interface_init (GstNavigationInterface * iface)
|
||||
|
|
Loading…
Reference in a new issue