summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-01-04 14:17:44 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-01-04 14:17:44 (GMT)
commitfc013b7be66a6d4fc13af8bd38b7e679ed3998af (patch)
treecc068fa05bbc357bce89f8c6dfe37d6308704a1e /src/corelib/kernel/qobject.cpp
parentbe41c140594ccea16ce17ccca7251d614cc75e1e (diff)
parent4d53a691aaac9789ddd4f9d4e968d28ace2181ca (diff)
downloadQt-fc013b7be66a6d4fc13af8bd38b7e679ed3998af.zip
Qt-fc013b7be66a6d4fc13af8bd38b7e679ed3998af.tar.gz
Qt-fc013b7be66a6d4fc13af8bd38b7e679ed3998af.tar.bz2
Merge branch 'master' into lighthouse-master
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r--src/corelib/kernel/qobject.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 7fe9c52..c3102ea 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -408,6 +408,8 @@ void QMetaObject::removeGuard(QObject **ptr)
if (!hash || hash->isEmpty())
return;
QMutexLocker locker(guardHashLock());
+ if (!*ptr) //check again, under the lock
+ return;
GuardHash::iterator it = hash->find(*ptr);
const GuardHash::iterator end = hash->end();
bool more = false; //if the QObject has more pointer attached to it.