Avoid crash with empty command line argument

It appears on iOS we can get a command line argument of "" which would
crash Subsurface-mobile on startup.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-06-17 04:10:34 -07:00
parent 24bd2eab43
commit 6cf100f1cc

View file

@ -31,7 +31,7 @@ int main(int argc, char **argv)
for (i = 1; i < arguments.length(); i++) {
QString a = arguments.at(i);
if (a.at(0) == '-') {
if (!a.isEmpty() && a.at(0) == '-') {
parse_argument(a.toLocal8Bit().data());
continue;
}