From 7808033421f77b15c667d7094dfe45bc9916ea4f Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Thu, 23 Feb 2017 22:52:17 -0500 Subject: [PATCH] Fix crash opening menu in some AU effects --- src/effects/audiounits/AudioUnitEffect.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/effects/audiounits/AudioUnitEffect.cpp b/src/effects/audiounits/AudioUnitEffect.cpp index 8684d053a..152ee8e89 100644 --- a/src/effects/audiounits/AudioUnitEffect.cpp +++ b/src/effects/audiounits/AudioUnitEffect.cpp @@ -245,7 +245,7 @@ void AudioUnitEffectsModule::LoadAudioUnitsOfType(OSType inAUType, result = AudioComponentGetDescription(component, &found); if (result == noErr) { - CFStringRef cfName; + CFStringRef cfName{}; result = AudioComponentCopyName(component, &cfName); CFunique_ptr uName{ cfName }; @@ -760,7 +760,7 @@ void AudioUnitEffectImportDialog::OnOk(wxCommandEvent & WXUNUSED(evt)) continue; } - CFDataRef xml; + CFDataRef xml{}; SInt32 error; Boolean res = CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault, url.get(), @@ -1673,7 +1673,7 @@ bool AudioUnitEffect::LoadFactoryPreset(int id) OSStatus result; // Retrieve the list of factory presets - CFArrayRef array; + CFArrayRef array{}; UInt32 dataSize = sizeof(CFArrayRef); result = AudioUnitGetProperty(mUnit, kAudioUnitProperty_FactoryPresets, @@ -1724,7 +1724,7 @@ wxArrayString AudioUnitEffect::GetFactoryPresets() wxArrayString presets; // Retrieve the list of factory presets - CFArrayRef array; + CFArrayRef array{}; UInt32 dataSize = sizeof(CFArrayRef); result = AudioUnitGetProperty(mUnit, kAudioUnitProperty_FactoryPresets,