From ce736406cde2edc2315ed58c27f6cd6482bedc65 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 22 Dec 2016 12:51:24 +0100 Subject: Check pointers for 0 before calling mark on them Fix the one place where we marked a Pointer without checking whether it is 0 first. Change-Id: I93ad0d9bc2d49594f3759ca429fd15615a16565f Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4regexpobject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4regexpobject.cpp') diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp index 218695624b..41d8010fef 100644 --- a/src/qml/jsruntime/qv4regexpobject.cpp +++ b/src/qml/jsruntime/qv4regexpobject.cpp @@ -307,7 +307,8 @@ void RegExpCtor::markObjects(Heap::Base *that, ExecutionEngine *e) { RegExpCtor::Data *This = static_cast(that); This->lastMatch.mark(e); - This->lastInput->mark(e); + if (This->lastInput) + This->lastInput->mark(e); FunctionObject::markObjects(that, e); } -- cgit v1.2.1