path: root/qmake
diff options
authorOswald Buddenhagen <>2011-07-15 15:39:27 +0200
committerQt by Nokia <>2011-07-15 16:00:06 +0200
commit68711f6ea7362bb2d2ae4d8e56a9928858db494f (patch)
tree91ec25b126c4e55ec8bdb73088cc3b074f72ab60 /qmake
parent412ef92162f8874a1585221125c31ef5f8ccc9cb (diff)
fix access to free()d memory
the 'item' reference may become invalid inside the loop. this approach was chosen (instead of making 'item' a non-reference) to keep the code more in sync with creator (where the string type is more complex). Change-Id: I60a4b0654dc47c0e3466d43904c358eb7e3e64e2 Reviewed-By: Marius Storm-Olsen Reviewed-on: Reviewed-by: Marius Storm-Olsen <>
Diffstat (limited to 'qmake')
1 files changed, 1 insertions, 1 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index ff5957765a..cb4117bef4 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -2289,7 +2289,7 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
foreach (const QString &dep, dependees[item]) {
QSet<QString> &dset = dependencies[dep];
- dset.remove(item);
+ dset.remove(; // *Don't* use 'item' - rootSet may have changed!
if (dset.isEmpty())
rootSet << dep;