forked from qt-creator/qt-creator
CppEditor: Fix possible null pointer access
Fixes: QTCREATORBUG-29484 Change-Id: I047ea13e6808902a3b0fb94b9eacdd48e411a22a Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -124,6 +124,9 @@ bool CppRefactoringFile::isCursorOn(unsigned tokenIndex) const
|
||||
|
||||
bool CppRefactoringFile::isCursorOn(const AST *ast) const
|
||||
{
|
||||
if (!ast)
|
||||
return false;
|
||||
|
||||
QTextCursor tc = cursor();
|
||||
int cursorBegin = tc.selectionStart();
|
||||
|
||||
|
Reference in New Issue
Block a user