diff options
-rw-r--r-- | gst/gstpipeline.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/gstpipeline.c b/gst/gstpipeline.c index 8612ae3e40..0694074e2b 100644 --- a/gst/gstpipeline.c +++ b/gst/gstpipeline.c @@ -421,7 +421,10 @@ gst_pipeline_change_state (GstElement * element, GstStateChange transition) } else { GST_DEBUG_OBJECT (pipeline, "Don't need to update clock, using old clock."); - clock = gst_object_ref (cur_clock); + /* only try to ref if cur_clock is not NULL */ + if (cur_clock) + gst_object_ref (cur_clock); + clock = cur_clock; } if (clock) { |