diff --git a/src/json/cmdhelper.cpp b/src/json/cmdhelper.cpp index aba41a5..69b1b6c 100644 --- a/src/json/cmdhelper.cpp +++ b/src/json/cmdhelper.cpp @@ -62,6 +62,7 @@ bool cmdHelper::getDiskUsed(double& used) { QString qstr = QString::fromStdString(str); QStringList strList = qstr.split('\n'); + if (strList.length()<3) return false; strList[1].replace(QRegExp("[\\s]+"), " "); QStringList strList2 = strList[1].split(" "); int pos = strList2[2].lastIndexOf(QChar('G'));