Ardour creates and derefences an editor instance without ever showing or parenting it (for the reason of finding out if it supports the apu in VST#PI::has_editor). That's a bit odd, but it also meant that _onDestroy was never called, since that was guarded by _created.
So add an _onDestroy which knows if ever created and resets just the pointer if not, allowing windows to not crash in Ardour
Ardour creates and derefences an editor instance without ever showing or parenting it (for the reason of finding out if it supports the apu in VST#PI::has_editor). That's a bit odd, but it also meant that _onDestroy was never called, since that was guarded by _created.
So add an _onDestroy which knows if ever created and resets just the pointer if not, allowing windows to not crash in Ardour