summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcache.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qcache.h')
-rw-r--r--src/corelib/tools/qcache.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/tools/qcache.h b/src/corelib/tools/qcache.h
index ee9523f..086a52f 100644
--- a/src/corelib/tools/qcache.h
+++ b/src/corelib/tools/qcache.h
@@ -70,8 +70,9 @@ class QCache
if (l == &n) l = n.p;
if (f == &n) f = n.n;
total -= n.c;
+ T *object = n.t;
hash.remove(*n.keyPtr);
- delete n.t;
+ delete object;
}
inline T *relink(const Key &key) {
typename QHash<Key, Node>::iterator i = hash.find(key);