[libdvdnav-devel] Do not dereference NULL on DVDCloseFile

Jean-Baptiste Kempf git at videolan.org
Wed Apr 9 15:43:31 CEST 2014


libdvdread | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Apr  9 14:04:05 2014 +0200| [d7d7c83c8baeed4eb71fe21856fbdcf061dfd373] | committer: Jean-Baptiste Kempf

Do not dereference NULL on DVDCloseFile

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

 src/dvd_reader.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dvd_reader.c b/src/dvd_reader.c
index bff5821..07f98be 100644
--- a/src/dvd_reader.c
+++ b/src/dvd_reader.c
@@ -937,7 +937,7 @@ void DVDCloseFile( dvd_file_t *dvd_file )
 {
   int i;
 
-  if( dvd_file ) {
+  if( dvd_file && dvd_file->dvd ) {
     if( !dvd_file->dvd->isImageFile ) {
       for( i = 0; i < TITLES_MAX; ++i ) {
         if( dvd_file->title_devs[ i ] ) {



More information about the libdvdnav-devel mailing list