diff --git a/src/persistence/profilelocker.cpp b/src/persistence/profilelocker.cpp index 14567212b..59d8f4db1 100644 --- a/src/persistence/profilelocker.cpp +++ b/src/persistence/profilelocker.cpp @@ -91,8 +91,7 @@ void ProfileLocker::unlock() return; lockfile->unlock(); - delete lockfile.release(); - lockfile = nullptr; + lockfile.reset(); curLockName.clear(); }