aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/PlainTextEditorPage.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ui/widgets/PlainTextEditorPage.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/widgets/PlainTextEditorPage.cpp b/src/ui/widgets/PlainTextEditorPage.cpp
index 2a6413bd..0161bf91 100644
--- a/src/ui/widgets/PlainTextEditorPage.cpp
+++ b/src/ui/widgets/PlainTextEditorPage.cpp
@@ -166,7 +166,7 @@ void PlainTextEditorPage::ReadFile() {
connect(this, &PlainTextEditorPage::destroyed, [=]() {
LOG(INFO) << "request interruption for read thread";
- thread->requestInterruption();
+ if (read_thread_ && thread->isRunning()) thread->requestInterruption();
read_thread_ = nullptr;
});
this->read_thread_ = thread;