aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2021-12-01 14:54:44 +0100
committerDavid Schulz <david.schulz@qt.io>2021-12-01 15:44:46 +0000
commit38b2bb9fb2fbc0d764605c9a103ff58ea26c2d61 (patch)
tree6c8856bfd81a25bbb614b20851ba77d5fd0baae5
parent06e1182574b4bb1c3adedcf0c7e9d532391f5f8a (diff)
TextEditor: Fix crash in hover handlerv6.0.0
Amends 2dbe5c72d8e9b. Change-Id: If4343f606af1bdf25409ffaef82e44456fee7ee4 Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r--src/plugins/texteditor/texteditor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp
index ef6e169813..28fe278cab 100644
--- a/src/plugins/texteditor/texteditor.cpp
+++ b/src/plugins/texteditor/texteditor.cpp
@@ -342,6 +342,7 @@ public:
void checkNext()
{
+ QTC_ASSERT(m_currentHandlerIndex >= 0, return);
QTC_ASSERT(m_currentHandlerIndex < m_handlers.size(), return);
BaseHoverHandler *currentHandler = m_handlers[m_currentHandlerIndex];
@@ -352,6 +353,7 @@ public:
void onHandlerFinished(int documentRevision, int position, int priority)
{
+ QTC_ASSERT(m_currentHandlerIndex >= 0, return);
QTC_ASSERT(m_currentHandlerIndex < m_handlers.size(), return);
QTC_ASSERT(documentRevision == m_documentRevision, return);
QTC_ASSERT(position == m_position, return);