[DVDnav-discuss] Do not crash on calling vm_close with NULL param

Jean-Baptiste Kempf git at videolan.org
Thu Jul 31 02:02:05 CEST 2014


libdvdnav | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Jul 31 01:52:16 2014 +0200| [354cf21f63d6b3af00e1d9980d710ad5242351c1] | committer: Jean-Baptiste Kempf

Do not crash on calling vm_close with NULL param

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

 src/vm/vm.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/vm/vm.c b/src/vm/vm.c
index 14497f5..7e4d594 100644
--- a/src/vm/vm.c
+++ b/src/vm/vm.c
@@ -308,6 +308,8 @@ void vm_stop(vm_t *vm) {
 }
 
 static void vm_close(vm_t *vm) {
+  if(!vm)
+    return;
   if(vm->vmgi) {
     ifoClose(vm->vmgi);
     vm->vmgi=NULL;



More information about the DVDnav-discuss mailing list