Commit 7feed731 authored by Sebastian Hartte's avatar Sebastian Hartte Committed by Oswald Buddenhagen
Browse files

Fixed a crash when deleting files from a project under certain conditions



Task-number: QTCREATORBUG-1804
Merge-request: 2168
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@nokia.com>
parent 8af5c9e1
......@@ -229,18 +229,18 @@ void ProWriter::addVarValues(ProFile *profile, QStringList *lines,
}
static void findProVariables(const ushort *tokPtr, const QStringList &vars,
QList<int> *proVars)
QList<int> *proVars, const uint firstLine = 0)
{
int lineNo = 0;
int lineNo = firstLine;
QString tmp;
const ushort *lastXpr = 0;
while (ushort tok = *tokPtr++) {
if (tok == TokBranch) {
uint blockLen = getBlockLen(tokPtr);
findProVariables(tokPtr, vars, proVars);
findProVariables(tokPtr, vars, proVars, lineNo);
tokPtr += blockLen;
blockLen = getBlockLen(tokPtr);
findProVariables(tokPtr, vars, proVars);
findProVariables(tokPtr, vars, proVars, lineNo);
tokPtr += blockLen;
} else if (tok == TokAssign || tok == TokAppend || tok == TokAppendUnique) {
if (getLiteral(lastXpr, tokPtr - 1, tmp) && vars.contains(tmp))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment