TextEditor: Fix crash in hover handler

Amends 2dbe5c72d8.

Change-Id: If4343f606af1bdf25409ffaef82e44456fee7ee4
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2021-12-01 14:54:44 +01:00
committed by David Schulz
parent 06e1182574
commit 38b2bb9fb2

View File

@@ -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);