Add an assert and simplify the code
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>
Sun, 7 Jun 2015 09:37:49 +0000 (11:37 +0200)
committerSimon Hausmann <simon.hausmann@theqtcompany.com>
Wed, 10 Jun 2015 04:26:03 +0000 (04:26 +0000)
commitf12c07216e25f9a326000e45583b9d5216945ee7
treea3c4defb16ff3a5ec2fda6f308f8de08a7ec9e1c
parent1e1a76b88192713bbdfd3b81f7310d496a644e9c
Add an assert and simplify the code

QV4::QObjectWrapper::wrap will unconditionally dereference
the engine. So simply assert that there is an engine.

Fixes Coverity CID 10631.

Change-Id: Ia645e32813b351abce1df06cfb63ef8ef956b9a6
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
src/qml/qml/qqmlvmemetaobject.cpp