aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-mobile-main.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-06-17 04:10:34 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-06-17 04:10:39 -0700
commit6cf100f1cc4924075f0081a4ae7a08992de4b85f (patch)
tree866cd16e41561a162f90345c606df64d845e05d8 /subsurface-mobile-main.cpp
parent24bd2eab437ff69b1ca47a92f01e448bbf26d3eb (diff)
downloadsubsurface-6cf100f1cc4924075f0081a4ae7a08992de4b85f.tar.gz
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>
Diffstat (limited to 'subsurface-mobile-main.cpp')
-rw-r--r--subsurface-mobile-main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/subsurface-mobile-main.cpp b/subsurface-mobile-main.cpp
index f32f11edc..68830a5cf 100644
--- a/subsurface-mobile-main.cpp
+++ b/subsurface-mobile-main.cpp
@@ -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;
}