Skip to content
Snippets Groups Projects
Commit f7caba39 authored by Aurindam Jana's avatar Aurindam Jana
Browse files

QMLDebugging: Fix crash


Check for null pointers when parsing AST to relocate breakpoint

Change-Id: I484048d9e8a7aabdeffc4e18049c9b9b6f030366
Reviewed-by: default avatarSimjees Abraham <simjees.abraham@nokia.com>
Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
Reviewed-by: default avatarRoberto Raggi <roberto.raggi@nokia.com>
parent d2b967b7
No related branches found
No related tags found
No related merge requests found
...@@ -154,6 +154,9 @@ public: ...@@ -154,6 +154,9 @@ public:
bool visit(UiScriptBinding *ast) bool visit(UiScriptBinding *ast)
{ {
if (!ast->statement)
return true;
quint32 sourceStartLine = ast->firstSourceLocation().startLine; quint32 sourceStartLine = ast->firstSourceLocation().startLine;
quint32 statementStartLine; quint32 statementStartLine;
quint32 statementColumn; quint32 statementColumn;
...@@ -165,6 +168,8 @@ public: ...@@ -165,6 +168,8 @@ public:
} else if (ast->statement->kind == Node::Kind_Block) { } else if (ast->statement->kind == Node::Kind_Block) {
Block *block = static_cast<Block *>(ast->statement); Block *block = static_cast<Block *>(ast->statement);
if (!block || !block->statements)
return true;
statementStartLine = block->statements->firstSourceLocation(). statementStartLine = block->statements->firstSourceLocation().
startLine; startLine;
statementColumn = block->statements->firstSourceLocation(). statementColumn = block->statements->firstSourceLocation().
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment