diff --git a/recording-daemon/metafile.c b/recording-daemon/metafile.c index feafd8522..0b4763b49 100644 --- a/recording-daemon/metafile.c +++ b/recording-daemon/metafile.c @@ -61,6 +61,8 @@ static void meta_destroy(metafile_t *mf) { // close all streams for (int i = 0; i < mf->streams->len; i++) { stream_t *stream = g_ptr_array_index(mf->streams, i); + if (!stream) + continue; pthread_mutex_lock(&stream->lock); stream_close(stream); pthread_mutex_unlock(&stream->lock);