diff options
Diffstat (limited to 'main.cpp')
| -rw-r--r-- | main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -225,8 +225,7 @@ int main(int argc, char *argv[]) // disallow multiple instances with same instance key QLockFile instance_lock {temp_dir.absoluteFilePath (a.applicationName () + ".lock")}; instance_lock.setStaleLockTime (0); - bool lock_ok {false}; - while (!(lock_ok = instance_lock.tryLock ())) + while (!instance_lock.tryLock ()) { if (QLockFile::LockFailedError == instance_lock.error ()) { @@ -249,6 +248,10 @@ int main(int argc, char *argv[]) throw std::runtime_error {"Multiple instances must have unique rig names"}; } } + else + { + throw std::runtime_error {"Failed to access lock file"}; + } } // load UI translations |
