From: Lars Knoll Date: Wed, 23 Jan 2013 19:44:47 +0000 (+0100) Subject: Don't crash on for(x in null) X-Git-Tag: upstream/5.2.1~669^2~659^2~404 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de0d7f657cdd82ed2ffd1b8d5f23b17b544b0144;p=platform%2Fupstream%2Fqtdeclarative.git Don't crash on for(x in null) Change-Id: I3bd5610fa9bffcc195bb1c96a5a595061931a20e Reviewed-by: Simon Hausmann --- diff --git a/qmljs_runtime.cpp b/qmljs_runtime.cpp index dddf89a..f23a93e 100644 --- a/qmljs_runtime.cpp +++ b/qmljs_runtime.cpp @@ -631,7 +631,7 @@ Value __qmljs_foreach_iterator_object(Value in, ExecutionContext *ctx) { if (!in.isNull() && !in.isUndefined()) in = __qmljs_to_object(in, ctx); - Object *it = ctx->engine->newForEachIteratorObject(ctx, in.objectValue()); + Object *it = ctx->engine->newForEachIteratorObject(ctx, in.asObject()); return Value::fromObject(it); } diff --git a/tests/TestExpectations b/tests/TestExpectations index 0aa424d..a6d9ca6 100644 --- a/tests/TestExpectations +++ b/tests/TestExpectations @@ -198,7 +198,6 @@ S15.1.2.1_A4.2 failing S15.1.2.1_A4.3 failing S15.1.2.1_A4.4 failing S15.1.2.1_A4.7 failing -S12.6.4_A2 failing S12.7_A7 failing S12.8_A4_T1 failing S12.8_A4_T2 failing