From 58db958839db7c052b95aae86ce9eb6f66ce9854 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 20 Dec 2018 19:41:57 +0100 Subject: [PATCH] Fix crash for external windows eg. LV2 externalUI windows are not managed by ardour; Ardour cannot intercept mapped() or delete_event() signals and hence also not create a visibility-tracker. First call to WindowProxy::toggle() creates the window, and the 2nd call crashed since 6ca8ec5141c, due to missing vistracker. e.g. externalUI plugin windows, the processor-box uses WindowProxy for all plugin-UIs incl. externalUIs. --- libs/gtkmm2ext/window_proxy.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/gtkmm2ext/window_proxy.cc b/libs/gtkmm2ext/window_proxy.cc index a9de011139..9ba0e320de 100644 --- a/libs/gtkmm2ext/window_proxy.cc +++ b/libs/gtkmm2ext/window_proxy.cc @@ -145,7 +145,11 @@ WindowProxy::toggle() save_pos_and_size(); } - vistracker->cycle_visibility (); + if (vistracker) { + vistracker->cycle_visibility (); + } else { + _window->present (); + } if (_window->is_mapped()) { if (_width != -1 && _height != -1) {