diff options
-rw-r--r-- | src/lib.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -94,8 +94,10 @@ stp_cleanup_transcode_server_ctx (TranscodeServerCtx *ctx) g_list_free (ctx->clients); /* Cleanup gstreamer pipeline */ - gst_element_set_state (ctx->pipeline, GST_STATE_NULL); - gst_object_unref (ctx->pipeline); + if (ctx->pipeline) { + gst_element_set_state (ctx->pipeline, GST_STATE_NULL); + gst_object_unref (ctx->pipeline); + } g_free (ctx); } |