From 3c4f13c23a0363bcfd9e78650795f8352056f7f2 Mon Sep 17 00:00:00 2001 From: Oliver Freyermuth Date: Sun, 24 Jan 2016 20:20:08 +0100 Subject: dvb: fix segmentation fault in case no valid configuration is found. This was introduced in c55b242 . --- stream/stream_dvb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'stream') diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c index 352759af15..4316adfb56 100644 --- a/stream/stream_dvb.c +++ b/stream/stream_dvb.c @@ -947,14 +947,15 @@ static int dvb_open(stream_t *stream) } dvb_state_t* state = dvb_get_state(stream); - state->stream_used = true; - pthread_mutex_unlock(&global_dvb_state_lock); priv->state = state; if (state == NULL) { MP_ERR(stream, "DVB CONFIGURATION IS EMPTY, exit\n"); + pthread_mutex_unlock(&global_dvb_state_lock); return STREAM_ERROR; } + state->stream_used = true; + pthread_mutex_unlock(&global_dvb_state_lock); if (state->is_on != 1) { // State could be already initialized, for example, we just did a channel switch. -- cgit v1.2.3