[DVDnav-discuss] Check for null program_map

Jon Fether git at videolan.org
Thu Nov 6 19:40:55 CET 2014


libdvdnav | branch: master | Jon Fether <jon at fether.org> | Wed Oct 22 18:00:25 2014 -0700| [feb09c3531e2c250f2c3b3dd9fffbe252de9fb32] | committer: Jean-Baptiste Kempf

Check for null program_map

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/libdvdnav.git/?a=commit;h=feb09c3531e2c250f2c3b3dd9fffbe252de9fb32
---

 src/searching.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/searching.c b/src/searching.c
index 93c7c2c..70c0f85 100644
--- a/src/searching.c
+++ b/src/searching.c
@@ -587,6 +587,11 @@ dvdnav_status_t dvdnav_get_position_in_title(dvdnav_t *this,
     return DVDNAV_STATUS_ERR;
   }
 
+  if (state->pgc->program_map == NULL) {
+    printerr("Program map missing.");
+    return DVDNAV_STATUS_ERR;
+  }
+
   /* Get current sector */
   cur_sector = this->vobu.vobu_start + this->vobu.blockN;
 



More information about the DVDnav-discuss mailing list