changeset 424:4219a513c804 src

Fix crash when trying to play a DVD from different region than currently set in the DVD drive. Patch by Erik Hovland *erik#hovland$.org! based on a patch by Sylvain Henry %hsyl20^gmail&com*.
author rathann
date Thu, 03 Oct 2013 22:10:07 +0000
parents 00c5edf5de12
children 323e54a7f200
files searching.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/searching.c	Sun Mar 17 14:06:49 2013 +0000
+++ b/searching.c	Thu Oct 03 22:10:07 2013 +0000
@@ -622,7 +622,11 @@
       goto fail;
     }
 
-    cellnr = pgc->program_map[ptt[i].pgn-1];
+    if ((cellnr = pgc->program_map[ptt[i].pgn-1]) == 0) {
+      printerr("Cell new row cannot be 0");
+      continue;
+    }
+
     if(ptt[i].pgn < pgc->nr_of_programs)
       endcellnr = pgc->program_map[ptt[i].pgn];
     else