Merge pull request #14403 from pandamicro/v3

Fix issue in ComponentJS::~ComponentJS
This commit is contained in:
pandamicro 2015-11-17 10:56:37 +08:00
commit efde3c3a0e
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ ComponentJS::ComponentJS(const std::string& scriptFileName)
ComponentJS::~ComponentJS() ComponentJS::~ComponentJS()
{ {
mozilla::Maybe<JS::PersistentRootedObject>* jsObj = static_cast<mozilla::Maybe<JS::PersistentRootedObject>*>(_jsObj); mozilla::Maybe<JS::PersistentRootedObject>* jsObj = static_cast<mozilla::Maybe<JS::PersistentRootedObject>*>(_jsObj);
if (jsObj == nullptr) if (jsObj != nullptr)
{ {
delete jsObj; delete jsObj;
} }