Commit e139c96c authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx/open: added missing sanity checks

parent 8564f347
......@@ -860,10 +860,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) );
......@@ -893,10 +896,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) );
......@@ -904,6 +910,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