sdp/message: fix segfault copying NULL in the boxed copy impl

Allows passing NULL as a value to g_object_set and as signal
parameters without crashing.
This commit is contained in:
Matthew Waters 2017-04-03 15:05:47 +10:00
parent 32ef8f54d4
commit fa243654cf

View file

@ -170,6 +170,9 @@ gst_sdp_message_boxed_copy (GstSDPMessage * orig)
{
GstSDPMessage *copy;
if (!orig)
return NULL;
if (gst_sdp_message_copy (orig, &copy) == GST_SDP_OK)
return copy;