waylandsink: fix assertion failure when stopping immediately after starting, without displaying anything

This was triggered in scenarios like
filesrc location=nonexistent_file ! decodebin ! waylandsink
This commit is contained in:
George Kiagiadakis 2014-05-21 12:58:10 +03:00
parent a543aef5ee
commit 882e1dd240

View file

@ -259,7 +259,7 @@ gst_wayland_sink_change_state (GstElement * element, GstStateChange transition)
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
if (gst_wl_window_is_toplevel (sink->window)) {
if (sink->window && gst_wl_window_is_toplevel (sink->window)) {
gst_buffer_replace (&sink->last_buffer, NULL);
g_clear_object (&sink->window);
}