summaryrefslogtreecommitdiff
path: root/src/uilocker.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-11-26 04:57:20 -0500
committerGitHub <noreply@github.com>2019-11-26 04:57:20 -0500
commite845126e09357f8713ca0c9f593970c7c634328e (patch)
treeb3e402809ded25a9d9d7b45e04935a85b96eb0a6 /src/uilocker.cpp
parent36c6dfd5b8c6c87410c7c18fb67fd00a72c29491 (diff)
parent5fb785aceecf32d6012bad044027572e02d22a9a (diff)
Merge pull request #904 from isanae/lock-job
Use a Job to capture all child processes
Diffstat (limited to 'src/uilocker.cpp')
-rw-r--r--src/uilocker.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/uilocker.cpp b/src/uilocker.cpp
index 01794d6b..8c4e0c2c 100644
--- a/src/uilocker.cpp
+++ b/src/uilocker.cpp
@@ -377,6 +377,8 @@ UILocker::~UILocker()
unlock(s.get());
}
}
+
+ g_instance = nullptr;
}
UILocker& UILocker::instance()
@@ -449,6 +451,12 @@ void UILocker::unlockCurrent()
void UILocker::updateLabel()
{
+ if (!m_ui) {
+ // this can happen if the lock overlay was destroyed while a cross-thread
+ // call for updateLabel() was in flight
+ return;
+ }
+
QStringList labels;
for (auto itor=m_sessions.rbegin(); itor!=m_sessions.rend(); ++itor) {