From 6cf100f1cc4924075f0081a4ae7a08992de4b85f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 17 Jun 2016 04:10:34 -0700 Subject: 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 --- subsurface-mobile-main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3-70-g09d2