From 5c3240cca3b0469280484f18c2d07b5f9af42f81 Mon Sep 17 00:00:00 2001 From: dynaflash Date: Fri, 3 Oct 2008 19:10:26 +0000 Subject: MacGui: Allow the macgui to properly read sources from a ZFS (zfs-119) formatted drive (experimental in Leopard). Thanks KonaB1end for the patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1803 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/HBDVDDetector.m | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'macosx') diff --git a/macosx/HBDVDDetector.m b/macosx/HBDVDDetector.m index fb9541dab..588d32d81 100644 --- a/macosx/HBDVDDetector.m +++ b/macosx/HBDVDDetector.m @@ -112,7 +112,18 @@ // A version 4 GetVolParmsInfoBuffer contains the BSD node name in the vMDeviceID field. // It is actually a char * value. This is mentioned in the header CoreServices/CarbonCore/Files.h. - return [NSString stringWithCString:(char *)volumeParms.vMDeviceID]; + if( volumeParms.vMVersion < 4 ) + { + return nil; + } + + // vMDeviceID might be zero as is reported with experimental ZFS (zfs-119) support in Leopard. + if( !volumeParms.vMDeviceID ) + { + return nil; + } + + return [NSString stringWithCString:(const char *)volumeParms.vMDeviceID]; } -- cgit v1.2.3