summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-06-26 19:02:06 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-06-26 19:02:06 +0200
commitfe192fe399bf5fb913938b1b70d9cbf198ede565 (patch)
treed953a393388e0ea84d12066babc484bc959103f5
parent4088363aead586c3dbcd0400b7f959744e49ad37 (diff)
message: Application and element messages should not have NULL structures
It does not make sense for them.
-rw-r--r--gst/gstmessage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/gstmessage.c b/gst/gstmessage.c
index 15c53287f..5555fb237 100644
--- a/gst/gstmessage.c
+++ b/gst/gstmessage.c
@@ -779,6 +779,8 @@ gst_message_new_segment_done (GstObject * src, GstFormat format,
GstMessage *
gst_message_new_application (GstObject * src, GstStructure * structure)
{
+ g_return_val_if_fail (structure != NULL, NULL);
+
return gst_message_new_custom (GST_MESSAGE_APPLICATION, src, structure);
}
@@ -800,6 +802,8 @@ gst_message_new_application (GstObject * src, GstStructure * structure)
GstMessage *
gst_message_new_element (GstObject * src, GstStructure * structure)
{
+ g_return_val_if_fail (structure != NULL, NULL);
+
return gst_message_new_custom (GST_MESSAGE_ELEMENT, src, structure);
}