diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-12-22 12:51:24 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-01-22 11:50:19 +0000 |
commit | ce736406cde2edc2315ed58c27f6cd6482bedc65 (patch) | |
tree | 591f530ad3380d9775ddf25d1e1f612fb21b3871 /src/qml/jsruntime/qv4regexpobject.cpp | |
parent | b3629b4c27a17e7fbb2f3098b17d9b449f64bc47 (diff) | |
download | qtdeclarative-ce736406cde2edc2315ed58c27f6cd6482bedc65.tar.gz |
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4regexpobject.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<RegExpCtor::Data *>(that); This->lastMatch.mark(e); - This->lastInput->mark(e); + if (This->lastInput) + This->lastInput->mark(e); FunctionObject::markObjects(that, e); } |