From 974bdba154826ea89c09a63500c745387fd85bf5 Mon Sep 17 00:00:00 2001 From: pandamicro Date: Mon, 16 Nov 2015 11:50:48 +0800 Subject: [PATCH] Fix issue in ComponentJS::~ComponentJS --- cocos/scripting/js-bindings/manual/component/CCComponentJS.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/scripting/js-bindings/manual/component/CCComponentJS.cpp b/cocos/scripting/js-bindings/manual/component/CCComponentJS.cpp index 29f98078f1..643a3abde3 100644 --- a/cocos/scripting/js-bindings/manual/component/CCComponentJS.cpp +++ b/cocos/scripting/js-bindings/manual/component/CCComponentJS.cpp @@ -94,7 +94,7 @@ ComponentJS::ComponentJS(const std::string& scriptFileName) ComponentJS::~ComponentJS() { mozilla::Maybe* jsObj = static_cast*>(_jsObj); - if (jsObj == nullptr) + if (jsObj != nullptr) { delete jsObj; }