From 66e714b476cc99e55920b02917eee3824c49b75b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 12 Jun 2023 14:41:41 -0600 Subject: [PATCH] fix crash when using -D accelerators --- gtk2_ardour/ardour_ui_keys.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/ardour_ui_keys.cc b/gtk2_ardour/ardour_ui_keys.cc index 3730c81107..32e7815d44 100644 --- a/gtk2_ardour/ardour_ui_keys.cc +++ b/gtk2_ardour/ardour_ui_keys.cc @@ -275,7 +275,9 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey * top level tab or a top level window) */ - DEBUG_TRACE (DEBUG::Accelerators, string_compose ("\tusing top level bindings %1 @ %2 for this event\n", top_level_bindings->name(), top_level_bindings)); + if (top_level_bindings) { + DEBUG_TRACE (DEBUG::Accelerators, string_compose ("\tusing top level bindings %1 @ %2 for this event\n", top_level_bindings->name(), top_level_bindings)); + } if (top_level_bindings && top_level_bindings->activate (k, Bindings::Press)) { DEBUG_TRACE (DEBUG::Accelerators, "\t\thandled\n");