Fix parser segfault

Passing an argument with a double dashed prefix was causing a
crash.
'flameshot --gui' instead of 'flameshot gui'
now it's handled correctly.
This commit is contained in:
lupoDharkael
2017-10-03 17:19:41 +02:00
parent f7b1436ed9
commit 4da6fd05a2

View File

@@ -157,7 +157,7 @@ bool CommandLineParser::processOptions(const QStringList &args,
break;
}
}
if (optionIt == actualNode->options.end()) {
if (optionIt == endIt) {
QString argName = actualNode->argument.name();
if (argName.isEmpty()) {
argName = qApp->applicationName();