Skip to content

Commit

Permalink
reFX: retain preset data while loading preset
Browse files Browse the repository at this point in the history
  • Loading branch information
FigBug committed Jan 14, 2021
1 parent 8570457 commit 51ce1fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm
Expand Up @@ -747,6 +747,8 @@ ComponentResult RestoreState (CFPropertyListRef inData) override
const int numBytes = (int) CFDataGetLength (data);
const juce::uint8* const rawBytes = CFDataGetBytePtr (data);

CFRetain (data);

if (numBytes > 0)
{
#if JUCE_AU_WRAPPERS_SAVE_PROGRAM_STATES
Expand All @@ -755,6 +757,8 @@ ComponentResult RestoreState (CFPropertyListRef inData) override
juceFilter->setStateInformation (rawBytes, numBytes);
#endif
}

CFRelease (data);
}
}
}
Expand Down

0 comments on commit 51ce1fc

Please sign in to comment.