From: Adam Sutton Date: Thu, 31 Jan 2013 10:20:17 +0000 (+0000) Subject: dvr: stop possible NULL ptr if messing about with config X-Git-Tag: v3.5~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51fa4bb0e34083bfd96db4aadd57a78ae14fc2c1;p=thirdparty%2Ftvheadend.git dvr: stop possible NULL ptr if messing about with config --- diff --git a/src/dvr/dvr_db.c b/src/dvr/dvr_db.c index b7c66d68b..78d5ad4be 100644 --- a/src/dvr/dvr_db.c +++ b/src/dvr/dvr_db.c @@ -849,6 +849,8 @@ dvr_entry_find_by_event(epg_broadcast_t *e) { dvr_entry_t *de; + if(!e->channel) return NULL; + LIST_FOREACH(de, &e->channel->ch_dvrs, de_channel_link) if(de->de_bcast == e) return de; return NULL;