Commit f7caba39 authored by Aurindam Jana's avatar Aurindam Jana

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
......@@ -154,6 +154,9 @@ public:
bool visit(UiScriptBinding *ast)
{
if (!ast->statement)
return true;
quint32 sourceStartLine = ast->firstSourceLocation().startLine;
quint32 statementStartLine;
quint32 statementColumn;
......@@ -165,6 +168,8 @@ public:
} else if (ast->statement->kind == Node::Kind_Block) {
Block *block = static_cast<Block *>(ast->statement);
if (!block || !block->statements)
return true;
statementStartLine = block->statements->firstSourceLocation().
startLine;
statementColumn = block->statements->firstSourceLocation().
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment