Diffusion Krita 4a3058a51176

Fix assert triggered for unbalanced unlock on (auto)save

Authored by kossebau on May 19 2016, 10:22 PM.

Description

Fix assert triggered for unbalanced unlock on (auto)save

Summary:
KisDocument::Private::SafeSavingLocker uses a member
KisImageBarrierLockAdapter m_imageLock to do the locking of KisImage.
Which it explicitely locks and unlocks again, to keep locking in balance,
together with std::try_lock.
But KisImageBarrierLockAdapter in its deconstructor unconditionally also
calls unlock on the image, without taking into account any state of other
unlock/lock calls.
Which then triggers the Q_ASSERT(locked()); in KisImage::unlock().

BUG: 363279

Reviewers: dkazakov, Krita:_next

Reviewed By: dkazakov, Krita:_next

Differential Revision: https://phabricator.kde.org/D1645

Details

Committed
kossebauMay 20 2016, 8:36 AM
Reviewer
Krita
Differential Revision
D1645: Fix assert triggered for unbalanced unlock on (auto)save
Parents
R37:e81d4c729453: Remove unused paramaters from KisImportExportManager api
Branches
Unknown
Tags
Unknown