We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41e6d8d commit a47a83cCopy full SHA for a47a83c
BGMApp/BGMApp/BGMAudioDevice.cpp
@@ -57,6 +57,8 @@ BGMAudioDevice::~BGMAudioDevice()
57
bool BGMAudioDevice::CanBeOutputDeviceInBGMApp() const
58
{
59
CFStringRef uid = CopyDeviceUID();
60
+ assert(uid != nullptr);
61
+
62
bool isNullDevice = CFEqual(uid, CFSTR(kBGMNullDeviceUID));
63
CFRelease(uid);
64
@@ -340,6 +342,9 @@ bool BGMAudioDevice::IsBGMDevice(bool inIncludeUISoundsInstance) const
340
342
341
343
// Check the device's UID to see whether it's BGMDevice.
344
345
+ if (uid == nullptr) {
346
+ return isBGMDevice;
347
+ }
348
349
isBGMDevice =
350
CFEqual(uid, CFSTR(kBGMDeviceUID)) ||
0 commit comments