don't try to look up the key info for actions that don't have accel paths
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 6 Aug 2010 23:45:20 +0000 (23:45 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 6 Aug 2010 23:45:20 +0000 (23:45 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7557 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/gtkmm2ext/gtk_ui.cc

index 6474f1828d3201d11d707191406d19308a593abf..456b8e29c8948940110ab0c776136286e3525e5d 100644 (file)
@@ -333,10 +333,13 @@ UI::set_tip (Widget *w, const gchar *tip, const gchar *hlp)
        Glib::RefPtr<Gtk::Action> action = w->get_action();
        if (action) {
                Gtk::AccelKey key;
-               bool has_key = ActionManager::lookup_entry(action->get_accel_path(), key);
-               if (has_key && key.get_abbrev() != "") {
-                       msg.append("\n\n Key: ").append(key.get_abbrev());
-               }
+                ustring ap = action->get_accel_path();
+                if (!ap.empty()) {
+                        bool has_key = ActionManager::lookup_entry(ap, key);
+                        if (has_key && key.get_abbrev() != "") {
+                                msg.append("\n\n Key: ").append(key.get_abbrev());
+                        }
+                }
        }
 
        if (req == 0) {