diff --git a/source/simulation/scripting/JSInterface_Entity.cpp b/source/simulation/scripting/JSInterface_Entity.cpp index 43dae560ef..12152a63f3 100755 --- a/source/simulation/scripting/JSInterface_Entity.cpp +++ b/source/simulation/scripting/JSInterface_Entity.cpp @@ -116,7 +116,7 @@ JSBool JSI_Entity::construct( JSContext* cx, JSObject* obj, unsigned int argc, j void JSI_Entity::finalize( JSContext* cx, JSObject* obj ) { - delete( JS_GetPrivate( cx, obj ) ); + delete( (HEntity*)JS_GetPrivate( cx, obj ) ); } void JSI_Entity::init()