summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qevent.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index d34b74d9d0..5a539ccaf6 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -479,8 +479,10 @@ void QMutableEventPoint::detach()
if (d->refCount == 1)
return; // no need: there is only one QEventPoint using it
qCDebug(lcEPDetach) << "detaching: refCount" << d->refCount << this;
+ auto old = d;
d = new QEventPointPrivate(*d);
d->refCount = 1;
+ --old->refCount;
}
/*! \internal