summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Sergey Starosek <sergey.starosek@gmail.com>2015-10-12 16:47:51 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-12 09:44:07 -0700
commit0c7e4d0cab5bd40e94a53046465bce2849fcf46a (patch)
tree2bd4015a699e07f6e67d67b8efbfb5e58ae872a6
parentc9c9673b75a25bc32825719dfde9300123de2d59 (diff)
downloadsubsurface-0c7e4d0cab5bd40e94a53046465bce2849fcf46a.tar.gz
Fix crash on empty arguments
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 71a998d34..f27a17474 100644
--- a/main.cpp
+++ b/main.cpp
@@ -39,6 +39,8 @@ int main(int argc, char **argv)
for (i = 1; i < arguments.length(); i++) {
QString a = arguments.at(i);
+ if (a.isEmpty())
+ continue;
if (a.at(0) == '-') {
parse_argument(a.toLocal8Bit().data());
continue;