From: Simon Hausmann Date: Sat, 8 Dec 2012 20:12:11 +0000 (+0100) Subject: Avoid uninitialized ExecutionContext::current pointer X-Git-Tag: upstream/5.2.1~669^2~659^2~709 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc9e8852c3d2b323b119c9151f13c41bc932608f;p=platform%2Fupstream%2Fqtdeclarative.git Avoid uninitialized ExecutionContext::current pointer Change-Id: I63fb1fbb39786fc349ccc121a25951b15ec31d57 Reviewed-by: Lars Knoll --- diff --git a/qmljs_environment.cpp b/qmljs_environment.cpp index caf8915..2a49a67 100644 --- a/qmljs_environment.cpp +++ b/qmljs_environment.cpp @@ -385,6 +385,7 @@ void ExecutionContext::initCallContext(ExecutionContext *parent, const Value tha engine = parent->engine; this->parent = parent; + engine->current = this; function = f; strictMode = f->strictMode; @@ -429,7 +430,9 @@ void ExecutionContext::leaveCallContext() delete[] locals; locals = 0; } + engine->current = parent; parent = 0; + function = 0; if (engine->debugger) engine->debugger->justLeft(this);