diff options
-rw-r--r-- | tests/icles/stress-xoverlay.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/icles/stress-xoverlay.c b/tests/icles/stress-xoverlay.c index 41a6c923b..4a7a3c7a2 100644 --- a/tests/icles/stress-xoverlay.c +++ b/tests/icles/stress-xoverlay.c @@ -143,13 +143,13 @@ static GstBusSyncReply create_window (GstBus * bus, GstMessage * message, GstPipeline * pipeline) { const GstStructure *s; GstXOverlay *ov = NULL; s = gst_message_get_structure (message); - if (!gst_structure_has_name (s, "prepare-xwindow-id")) { + if (s == NULL || !gst_structure_has_name (s, "prepare-xwindow-id")) { return GST_BUS_PASS; } ov = GST_X_OVERLAY (GST_MESSAGE_SRC (message)); g_print ("Creating our own window\n"); @@ -158,12 +158,13 @@ create_window (GstBus * bus, GstMessage * message, GstPipeline * pipeline) g_timeout_add (50, (GSourceFunc) resize_window, pipeline); g_timeout_add (50, (GSourceFunc) move_window, pipeline); g_timeout_add (100, (GSourceFunc) cycle_window, ov); g_timeout_add (2000, (GSourceFunc) toggle_events, ov); + gst_message_unref (message); return GST_BUS_DROP; } #if 0 static gboolean terminate_playback (GstElement * pipeline) |