Skip to content

Commit

Permalink
fix crash in BGMPlayThrough::IsRunningSomewhereOtherThanBGMApp
Browse files Browse the repository at this point in the history
  • Loading branch information
johzzy committed Dec 6, 2024
1 parent 0aea54f commit 7e592eb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions BGMApp/BGMApp/BGMPlayThrough.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -933,9 +933,8 @@ void BGMPlayThrough::HandleBGMDeviceIsRunningSomewhereOtherThanBGMApp(BGMPlay
// static
bool BGMPlayThrough::IsRunningSomewhereOtherThanBGMApp(const BGMAudioDevice& inBGMDevice)
{
return CFBooleanGetValue(
static_cast<CFBooleanRef>(
inBGMDevice.GetPropertyData_CFType(kBGMRunningSomewhereOtherThanBGMAppAddress)));
auto type = inBGMDevice.GetPropertyData_CFType(kBGMRunningSomewhereOtherThanBGMAppAddress);
return type && CFBooleanGetValue(static_cast<CFBooleanRef>(type));
}

#pragma mark IOProcs
Expand Down

0 comments on commit 7e592eb

Please sign in to comment.