mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-31 03:00:05 +00:00
AU: Added nullptr check in getNumPrograms()
This commit is contained in:
parent
40d415b670
commit
2b96435dbb
1 changed files with 5 additions and 2 deletions
|
|
@ -1213,8 +1213,11 @@ public:
|
|||
if (AudioUnitGetProperty (audioUnit, kAudioUnitProperty_FactoryPresets,
|
||||
kAudioUnitScope_Global, 0, &presets, &sz) == noErr)
|
||||
{
|
||||
num = (int) CFArrayGetCount (presets);
|
||||
CFRelease (presets);
|
||||
if (presets != nullptr)
|
||||
{
|
||||
num = (int) CFArrayGetCount (presets);
|
||||
CFRelease (presets);
|
||||
}
|
||||
}
|
||||
|
||||
return num;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue