From 18cfbae67c7394e4858f91bc3fe77b6be7337d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 15 Jun 2006 14:26:40 +0000 Subject: Don't try to access auth_drive if it's not present at all, avoid crashes. Thanks to Lars for reporting. CVS patchset: 8039 CVS date: 2006/06/15 14:26:40 --- src/input/libdvdnav/dvd_reader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/input/libdvdnav/dvd_reader.c b/src/input/libdvdnav/dvd_reader.c index 6ca1a18b9..6997f5bb2 100644 --- a/src/input/libdvdnav/dvd_reader.c +++ b/src/input/libdvdnav/dvd_reader.c @@ -482,7 +482,7 @@ dvd_reader_t *DVDOpen( const char *ppath ) auth_drive = DVDOpenImageFile( me->mnt_fsname, have_css ); /* If the device is not encrypted, don't access the device * directly as it would fail for non-UDF DVDs */ - if ( dvdinput_is_encrypted( auth_drive->dev ) == 0) { + if ( auth_drive && dvdinput_is_encrypted( auth_drive->dev ) == 0) { DVDClose( auth_drive ); auth_drive = NULL; break; -- cgit v1.2.3