Mercurial > libdvdnav.hg
comparison vm/vm.c @ 418:fe65a31e707a src
Fix failed assertion when there's no menu.
Patch by Erik Hovland.
author | rathann |
---|---|
date | Sun, 09 Dec 2012 21:13:14 +0000 |
parents | 34e632fb6a39 |
children | 3d942df13d3a |
comparison
equal
deleted
inserted
replaced
417:af0b6a8bf7e9 | 418:fe65a31e707a |
---|---|
1760 | 1760 |
1761 static int set_PGCN(vm_t *vm, int pgcN) { | 1761 static int set_PGCN(vm_t *vm, int pgcN) { |
1762 pgcit_t *pgcit; | 1762 pgcit_t *pgcit; |
1763 | 1763 |
1764 pgcit = get_PGCIT(vm); | 1764 pgcit = get_PGCIT(vm); |
1765 assert(pgcit != NULL); /* ?? Make this return -1 instead */ | 1765 if (pgcit != NULL) |
1766 return 0; | |
1766 | 1767 |
1767 if(pgcN < 1 || pgcN > pgcit->nr_of_pgci_srp) { | 1768 if(pgcN < 1 || pgcN > pgcit->nr_of_pgci_srp) { |
1768 #ifdef TRACE | 1769 #ifdef TRACE |
1769 fprintf(MSG_OUT, "libdvdnav: ** No such pgcN = %d\n", pgcN); | 1770 fprintf(MSG_OUT, "libdvdnav: ** No such pgcN = %d\n", pgcN); |
1770 #endif | 1771 #endif |