summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-12-14 20:28:11 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-12-14 20:28:11 +0000
commitee5a37a306babadc81ac4a2612b260dc612a381a (patch)
tree52d7da5bb0f08a6b6d42c7dd4ab9bfba88939465 /gtk2_ardour
parent3c48aabbbe9db1a7beffec7728f7ccf24f0a1ba1 (diff)
minor safety check for symmetry
git-svn-id: svn://localhost/ardour2/branches/3.0@8276 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/plugin_ui.cc24
1 files changed, 16 insertions, 8 deletions
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index c51566614d..d46f1e9542 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -367,15 +367,23 @@ PluginUIWindow::on_key_press_event (GdkEventKey* event)
}
return true;
} else {
- if (_pluginui->non_gtk_gui()) {
- /* pass editor window as the window for the event
- to be handled in, not this one, because there are
- no widgets in this window that we want to have
- key focus.
- */
- return relay_key_press (event, &PublicEditor::instance());
+ /* for us to be getting key press events, there really
+ MUST be a _pluginui, but just to be safe, check ...
+ */
+
+ if (_pluginui) {
+ if (_pluginui->non_gtk_gui()) {
+ /* pass editor window as the window for the event
+ to be handled in, not this one, because there are
+ no widgets in this window that we want to have
+ key focus.
+ */
+ return relay_key_press (event, &PublicEditor::instance());
+ } else {
+ return relay_key_press (event, this);
+ }
} else {
- return relay_key_press (event, this);
+ return false;
}
}
}