From: dooglus Date: Sun, 10 Feb 2008 23:56:49 +0000 (+0000) Subject: The --layer-info flag requires an extra parameter. Make sure it has been supplied... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5342158a872bf2c3ffbc34f52847ddadfc171307;p=synfig.git The --layer-info flag requires an extra parameter. Make sure it has been supplied before trying to read it. git-svn-id: http://svn.voria.com/code@1664 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/tool/main.cpp b/synfig-core/trunk/src/tool/main.cpp index 17b7a4c..370e8bb 100644 --- a/synfig-core/trunk/src/tool/main.cpp +++ b/synfig-core/trunk/src/tool/main.cpp @@ -418,6 +418,10 @@ int process_global_flags(arg_list_t &arg_list) Progress p(PACKAGE); synfig::Main synfig_main(dirname(progname),&p); iter=next++; + if (iter==arg_list.end()) { + error("The `%s' flag requires a value. Use --help for a list of options.", "--layer-info"); + return SYNFIGTOOL_MISSINGARGUMENT; + } Layer::Handle layer=synfig::Layer::create(*iter); cout<<"Layer Name: "<get_name()<get_local_name()<