forked from qt-creator/qt-creator
TextEditor: Fix crash in hover handler
Amends 2dbe5c72d8
.
Change-Id: If4343f606af1bdf25409ffaef82e44456fee7ee4
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
committed by
David Schulz
parent
06e1182574
commit
38b2bb9fb2
@@ -342,6 +342,7 @@ public:
|
|||||||
|
|
||||||
void checkNext()
|
void checkNext()
|
||||||
{
|
{
|
||||||
|
QTC_ASSERT(m_currentHandlerIndex >= 0, return);
|
||||||
QTC_ASSERT(m_currentHandlerIndex < m_handlers.size(), return);
|
QTC_ASSERT(m_currentHandlerIndex < m_handlers.size(), return);
|
||||||
BaseHoverHandler *currentHandler = m_handlers[m_currentHandlerIndex];
|
BaseHoverHandler *currentHandler = m_handlers[m_currentHandlerIndex];
|
||||||
|
|
||||||
@@ -352,6 +353,7 @@ public:
|
|||||||
|
|
||||||
void onHandlerFinished(int documentRevision, int position, int priority)
|
void onHandlerFinished(int documentRevision, int position, int priority)
|
||||||
{
|
{
|
||||||
|
QTC_ASSERT(m_currentHandlerIndex >= 0, return);
|
||||||
QTC_ASSERT(m_currentHandlerIndex < m_handlers.size(), return);
|
QTC_ASSERT(m_currentHandlerIndex < m_handlers.size(), return);
|
||||||
QTC_ASSERT(documentRevision == m_documentRevision, return);
|
QTC_ASSERT(documentRevision == m_documentRevision, return);
|
||||||
QTC_ASSERT(position == m_position, return);
|
QTC_ASSERT(position == m_position, return);
|
||||||
|
Reference in New Issue
Block a user