Don't crash if get_action() is called before the UI manager is created. Sort-of...
authorCarl Hetherington <carl@carlh.net>
Mon, 6 Dec 2010 13:59:59 +0000 (13:59 +0000)
committerCarl Hetherington <carl@carlh.net>
Mon, 6 Dec 2010 13:59:59 +0000 (13:59 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8199 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/gtkmm2ext/actions.cc

index e9ff15fa461f263934cdac1b2ced7713f3920110..43a2a24d2d900909ac1a834a869363cc9bf5c2d1 100644 (file)
@@ -237,6 +237,10 @@ ActionManager::get_action (const char* group_name, const char* action_name)
           gtkmm2.6, so we fall back to the C level.
        */
 
+       if (ui_manager == 0) {
+               return RefPtr<Action> ();
+       }
+
        GList* list = gtk_ui_manager_get_action_groups (ui_manager->gobj());
        GList* node;
        RefPtr<Action> act;