[DVDnav-discuss] Do not assert on NULL pgcit
Jean-Baptiste Kempf
git at videolan.org
Sun Aug 31 00:42:49 CEST 2014
libdvdnav | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Aug 31 00:40:47 2014 +0200| [697a62a737c945d15c8836b44c4972123ddc9e0c] | committer: Jean-Baptiste Kempf
Do not assert on NULL pgcit
> http://git.videolan.org/gitweb.cgi/libdvdnav.git/?a=commit;h=697a62a737c945d15c8836b44c4972123ddc9e0c
---
src/vm/getset.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/vm/getset.c b/src/vm/getset.c
index 12b24ec..dda9440 100644
--- a/src/vm/getset.c
+++ b/src/vm/getset.c
@@ -242,7 +242,10 @@ int get_ID(vm_t *vm, int id) {
/* Relies on state to get the correct pgcit. */
pgcit = get_PGCIT(vm);
- assert(pgcit != NULL);
+ if(pgcit == NULL) {
+ fprintf(MSG_OUT, "libdvdnav: PGCIT null!\n", id);
+ return 0;
+ }
#ifdef TRACE
fprintf(MSG_OUT, "libdvdnav: ** Searching for menu (0x%x) entry PGC\n", id);
#endif
More information about the DVDnav-discuss
mailing list