diff options
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r-- | src/qml/jsruntime/qv4internalclass_p.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4internalclass_p.h b/src/qml/jsruntime/qv4internalclass_p.h index 403702ae55..b2fe0c8aa9 100644 --- a/src/qml/jsruntime/qv4internalclass_p.h +++ b/src/qml/jsruntime/qv4internalclass_p.h @@ -239,8 +239,7 @@ struct SharedInternalClassData { Q_ASSERT(d->refcount > 1); // need to detach Private *dd = new Private(*d, pos, value); - if (!--d->refcount) - delete d; + --d->refcount; d = dd; return; } @@ -260,8 +259,7 @@ struct SharedInternalClassData { if (d->refcount > 1) { // need to detach Private *dd = new Private(*d); - if (!--d->refcount) - delete d; + --d->refcount; d = dd; } d->set(pos, value); |