summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib.c b/src/lib.c
index 868e060..838f9e2 100644
--- a/src/lib.c
+++ b/src/lib.c
@@ -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);
}