From fc9e8852c3d2b323b119c9151f13c41bc932608f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Sat, 8 Dec 2012 21:12:11 +0100 Subject: [PATCH] Avoid uninitialized ExecutionContext::current pointer Change-Id: I63fb1fbb39786fc349ccc121a25951b15ec31d57 Reviewed-by: Lars Knoll --- qmljs_environment.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.7.4