diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/kconfig.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp index 782e9714..1da816fa 100644 --- a/src/core/kconfig.cpp +++ b/src/core/kconfig.cpp @@ -440,6 +440,12 @@ bool KConfig::sync() QExplicitlySharedDataPointer<KConfigBackend> tmp = KConfigBackend::create(d->sGlobalFileName); if (d->configState == ReadWrite && !tmp->lock()) { qWarning() << "couldn't lock global file"; + + //unlock the local config if we're returning early + if (d->mBackend->isLocked()) { + d->mBackend->unlock(); + } + d->bDirty = true; return false; } |