diff -r ef0373b55136 -r 758a864f9613 src/corelib/tools/qmap.h --- a/src/corelib/tools/qmap.h Fri Sep 17 08:34:18 2010 +0300 +++ b/src/corelib/tools/qmap.h Mon Oct 04 01:19:32 2010 +0300 @@ -426,10 +426,11 @@ Q_INLINE_TEMPLATE QMap &QMap::operator=(const QMap &other) { if (d != other.d) { - other.d->ref.ref(); + QMapData* o = other.d; + o->ref.ref(); if (!d->ref.deref()) freeData(d); - d = other.d; + d = o; if (!d->sharable) detach_helper(); }