summaryrefslogtreecommitdiffstats
path: root/src/inkview.cpp
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2017-05-14 04:38:05 +0000
committerEduard Braun <eduard.braun2@gmx.de>2017-05-14 04:38:05 +0000
commit7ac22eb4ab56e0ddc1242b88cdb03a275631615a (patch)
treecd30ece9233e572ce0e5814c5c68a6c231bdc705 /src/inkview.cpp
parentInkview: add option -s or --scale to set a factor by witch to scale the displ... (diff)
downloadinkscape-7ac22eb4ab56e0ddc1242b88cdb03a275631615a.tar.gz
inkscape-7ac22eb4ab56e0ddc1242b88cdb03a275631615a.zip
Inkview: Don't crash when unknow command line option is specified
(bzr r15690.1.15)
Diffstat (limited to 'src/inkview.cpp')
-rw-r--r--src/inkview.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/inkview.cpp b/src/inkview.cpp
index e50c76ab0..05d8cd1eb 100644
--- a/src/inkview.cpp
+++ b/src/inkview.cpp
@@ -164,7 +164,14 @@ int main (int argc, char **argv)
context.set_main_group(options);
- Gtk::Main main_instance (argc, argv, context);
+ Gtk::Main main_instance(true);
+ try {
+ context.parse(argc, argv);
+ } catch (const Glib::Error& ex) {
+ g_printerr("%s\n\n", ex.what().c_str());
+ g_print("%s", context.get_help().c_str());
+ exit(EXIT_FAILURE);
+ }
LIBXML_TEST_VERSION