waylandsink: fix assertion failure when stopping immediately after starting, without...
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Wed, 21 May 2014 09:58:10 +0000 (12:58 +0300)
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Tue, 17 Jun 2014 11:51:27 +0000 (13:51 +0200)
This was triggered in scenarios like
filesrc location=nonexistent_file ! decodebin ! waylandsink

ext/wayland/gstwaylandsink.c

index 14282de..4053d94 100644 (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);
       }