summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-03-02 23:08:56 +0200
committerAndreas Kling <kling@serenityos.org>2021-03-04 10:11:01 +0100
commitc1c37cc5bd4c95dd35a56abe17a2522eebdd3635 (patch)
tree7e30d2e28a6de427401f081c00489333534a4052 /Userland/Libraries/LibGUI
parent953f4f7e60911b632a8fb635aaea79db40abb4ec (diff)
downloadserenity-c1c37cc5bd4c95dd35a56abe17a2522eebdd3635.zip
TextEditor: Don't attempt to stop the autocomplete timer if it is null
Closes #5567
Diffstat (limited to 'Userland/Libraries/LibGUI')
-rw-r--r--Userland/Libraries/LibGUI/TextEditor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp
index 5f33b4f87d..8b8105615c 100644
--- a/Userland/Libraries/LibGUI/TextEditor.cpp
+++ b/Userland/Libraries/LibGUI/TextEditor.cpp
@@ -1317,8 +1317,9 @@ void TextEditor::did_change()
m_undo_action->set_enabled(can_undo());
m_redo_action->set_enabled(can_redo());
if (m_autocomplete_box && !m_should_keep_autocomplete_box) {
- m_autocomplete_timer->stop();
m_autocomplete_box->close();
+ if (m_autocomplete_timer)
+ m_autocomplete_timer->stop();
}
if (!m_has_pending_change_notification) {
m_has_pending_change_notification = true;