Fix a crash in BGMBackgroundMusicDevice::ResponsibleBundleIDsOf.

If the bundle ID passed to the function (a CACFString) was wrapping a
null CFStringRef, one of the comparison operator functions of CACFString
would pass null to CFStringCompare.
This commit is contained in:
Kyle Neideck 2017-09-12 20:09:04 +10:00
parent 07a419fb34
commit 289f6b3d27
No known key found for this signature in database
GPG key ID: CAA8D9B8E39EC18C

View file

@ -212,6 +212,11 @@ void BGMBackgroundMusicDevice::SendAppVolumeOrPanToBGMDevice(SInt32 inNewValue,
std::vector<CACFString>
BGMBackgroundMusicDevice::ResponsibleBundleIDsOf(CACFString inParentBundleID)
{
if(!inParentBundleID.IsValid())
{
return {};
}
std::map<CACFString, std::vector<CACFString>> bundleIDMap = {
// Finder
{ "com.apple.finder", { "com.apple.quicklook.ui.helper" } },