summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/actions.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/gtkmm2ext/actions.cc')
-rw-r--r--libs/gtkmm2ext/actions.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/gtkmm2ext/actions.cc b/libs/gtkmm2ext/actions.cc
index 84a738f278..200308a254 100644
--- a/libs/gtkmm2ext/actions.cc
+++ b/libs/gtkmm2ext/actions.cc
@@ -27,6 +27,7 @@
#include <gtk/gtkuimanager.h>
#include <gtk/gtkactiongroup.h>
+#include <gtkmm.h>
#include <gtkmm/accelmap.h>
#include <gtkmm/uimanager.h>
@@ -265,15 +266,15 @@ ActionManager::get_action (const char* path)
path++;
}
- char copy[len+1];
- strcpy (copy, path);
- char* slash = strchr (copy, '/');
+ vector<char> copy(len+1);
+ strcpy (&copy[0], path);
+ char* slash = strchr (&copy[0], '/');
if (!slash) {
return RefPtr<Action> ();
}
*slash = '\0';
- return get_action (copy, ++slash);
+ return get_action (&copy[0], ++slash);
}