]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix potential null-pointer-dereference
authorFlole998 <Flole998@users.noreply.github.com>
Fri, 8 Apr 2022 03:58:34 +0000 (05:58 +0200)
committerGitHub <noreply@github.com>
Fri, 8 Apr 2022 03:58:34 +0000 (05:58 +0200)
src/dvr/dvr_db.c

index 13de1de96060b4cff2d894b119b42d25579a2c7f..955bafcaddd8ae8d6596effef29e918e17790e4f 100644 (file)
@@ -1854,7 +1854,7 @@ dvr_is_better_recording_timeslot(const epg_broadcast_t *new_bcast, const dvr_ent
   /* If programme is recording (or completed) then it is the "best",
    * even if a better schedule is found after recording starts.
    */
-  if (old_de->de_sched_state != DVR_SCHEDULED)
+  if (old_de && old_de->de_sched_state != DVR_SCHEDULED)
     return 0;
 
   if (!old_de || !old_de->de_bcast) return 1;            /* Old broadcast should always exist */