Commit 366d2126 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx/open: added missing sanity checks

(cherry picked from commit e139c96c)
parent 3acd873e
......@@ -701,10 +701,13 @@ static VLCOpen *_o_sharedMainInstance = nil;
NULL,
NULL
);
if ( noErr == err ) {
if ( noErr == err )
actualVolume = catalogInfo.volume;
}
else
return @"";
}
else
return @"";
GetVolParmsInfoBuffer volumeParms;
err = FSGetVolumeParms( actualVolume, &volumeParms, sizeof(volumeParms) );
......@@ -734,10 +737,13 @@ static VLCOpen *_o_sharedMainInstance = nil;
NULL,
NULL
);
if ( noErr == err ) {
if ( noErr == err )
actualVolume = catalogInfo.volume;
}
else
return NULL;
}
else
return NULL;
GetVolParmsInfoBuffer volumeParms;
err = FSGetVolumeParms( actualVolume, &volumeParms, sizeof(volumeParms) );
......@@ -745,6 +751,9 @@ static VLCOpen *_o_sharedMainInstance = nil;
CFMutableDictionaryRef matchingDict;
io_service_t service;
if (!volumeParms.vMDeviceID)
return NULL;
matchingDict = IOBSDNameMatching(kIOMasterPortDefault, 0, volumeParms.vMDeviceID);
service = IOServiceGetMatchingService(kIOMasterPortDefault, matchingDict);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment