diff --git a/recording-daemon/metafile.c b/recording-daemon/metafile.c index 1262632d67..2eaf01ce26 100644 --- a/recording-daemon/metafile.c +++ b/recording-daemon/metafile.c @@ -60,6 +60,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);