summaryrefslogtreecommitdiffstats
path: root/src/actions
diff options
context:
space:
mode:
authorNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-03-21 15:03:57 +0000
committerNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-03-21 15:04:13 +0000
commit361b72ec50c3c4b1f25acae6242b389fd8b5700e (patch)
treefbc9036f1751e25eea20e4f4af11e673e33fc72a /src/actions
parentfix #145 XML editor crash removing style property (diff)
downloadinkscape-361b72ec50c3c4b1f25acae6242b389fd8b5700e.tar.gz
inkscape-361b72ec50c3c4b1f25acae6242b389fd8b5700e.zip
Empty string exception for CLI verbs
Fixes https://gitlab.com/inkscape/inbox/issues/232
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/actions-base.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/actions/actions-base.cpp b/src/actions/actions-base.cpp
index 252eb956f..be426d489 100644
--- a/src/actions/actions-base.cpp
+++ b/src/actions/actions-base.cpp
@@ -177,7 +177,7 @@ verbs(Glib::ustring verblist, InkscapeApplication* app)
auto tokens = Glib::Regex::split_simple("\\s*;\\s*", verblist);
for (auto token : tokens) {
std::vector<Glib::ustring> parts = Glib::Regex::split_simple("\\s*:\\s*", token); // Second part is always ignored... we could implement it but better to switch to Gio::Actions
- if (!parts[0].empty()) {
+ if (!parts.empty() && !parts[0].empty()) {
Inkscape::Verb* verb = Inkscape::Verb::getbyid(parts[0].c_str());
if (verb == nullptr) {
std::cerr << "verbs_action: Invalid verb: " << parts[0] << std::endl;