Преглед на файлове

TextEditor: Don't attempt to stop the autocomplete timer if it is null

Closes #5567
Itamar преди 4 години
родител
ревизия
c1c37cc5bd
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      Userland/Libraries/LibGUI/TextEditor.cpp

+ 2 - 1
Userland/Libraries/LibGUI/TextEditor.cpp

@@ -1317,8 +1317,9 @@ void TextEditor::did_change()
     m_undo_action->set_enabled(can_undo());
     m_undo_action->set_enabled(can_undo());
     m_redo_action->set_enabled(can_redo());
     m_redo_action->set_enabled(can_redo());
     if (m_autocomplete_box && !m_should_keep_autocomplete_box) {
     if (m_autocomplete_box && !m_should_keep_autocomplete_box) {
-        m_autocomplete_timer->stop();
         m_autocomplete_box->close();
         m_autocomplete_box->close();
+        if (m_autocomplete_timer)
+            m_autocomplete_timer->stop();
     }
     }
     if (!m_has_pending_change_notification) {
     if (!m_has_pending_change_notification) {
         m_has_pending_change_notification = true;
         m_has_pending_change_notification = true;