diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index ec0029ec09..ca6d921087 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -2411,8 +2411,16 @@ private: #if JUCE_SUPPORTS_AUv3 void requestViewControllerCallback (AUViewControllerBase* controller) { - auto nsSize = [controller preferredContentSize]; - auto viewSize = CGSizeMake (nsSize.width, nsSize.height); + const auto viewSize = [&controller] + { + auto size = [controller preferredContentSize]; + + if (size.width == 0 || size.height == 0) + size = controller.view.frame.size; + + return CGSizeMake (jmax ((CGFloat) 20.0f, size.width), + jmax ((CGFloat) 20.0f, size.height)); + }(); if (! MessageManager::getInstance()->isThisTheMessageThread()) {