mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
VST3: ignore GUI size allocations before realizing the view
This fixes crashes with some VST3s when calling `onSize()` before attaching thew view (e.g. Reason Rack Plug on macOS).
This commit is contained in:
parent
aef366c156
commit
7e2bb01ff1
5 changed files with 11 additions and 4 deletions
|
|
@ -65,6 +65,7 @@ VST3HWNDPluginUI::view_realized ()
|
|||
if (kResultOk != view->attached (reinterpret_cast<void*> (hwnd), Steinberg::kPlatformTypeHWND)) {
|
||||
assert (0);
|
||||
}
|
||||
_view_realized = true;
|
||||
|
||||
ViewRect rect;
|
||||
if (view->getSize (&rect) == kResultOk) {
|
||||
|
|
@ -86,7 +87,7 @@ void
|
|||
VST3HWNDPluginUI::view_size_allocate (Gtk::Allocation& allocation)
|
||||
{
|
||||
IPlugView* view = _vst3->view ();
|
||||
if (!view) {
|
||||
if (!view || !_view_realized) {
|
||||
return;
|
||||
}
|
||||
PBD::Unwinder<bool> uw (_resize_in_progress, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue