diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c index 8c19f796e7..e5b9398dfe 100644 --- a/sys/kms/gstkmssink.c +++ b/sys/kms/gstkmssink.c @@ -683,7 +683,8 @@ gst_kms_sink_stop (GstBaseSink * bsink) self = GST_KMS_SINK (bsink); - gst_kms_allocator_clear_cache (self->allocator); + if (self->allocator) + gst_kms_allocator_clear_cache (self->allocator); gst_buffer_replace (&self->last_buffer, NULL); gst_caps_replace (&self->allowed_caps, NULL);