[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kio/kio
From:       Matthias Fuchs <mat69 () gmx ! net>
Date:       2011-01-16 17:39:43
Message-ID: 20110116173943.1AAF33E1F2 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1214856 by mfuchs:

Check if list is empty.
BUG:259995
CCMAIL:faure@kde.org

 M  +8 -1      krun.cpp  


--- trunk/KDE/kdelibs/kio/kio/krun.cpp #1214855:1214856
@@ -1049,7 +1049,14 @@
         kWarning() << "Command was empty, nothing to run";
         return false;
     }
-    const QString bin = KShell::splitArgs(cmd).first();
+
+    const QStringList args = KShell::splitArgs(cmd);
+    if (args.isEmpty()) {
+        kWarning() << "Command could not be parsed.";
+        return false;
+    }
+
+    const QString bin = args.first();
     return KRun::runCommand(cmd, bin, bin /*iconName*/, window, \
QByteArray(), workingDirectory);  }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic