mirror of https://github.com/axmolengine/axmol.git
Merge pull request #14403 from pandamicro/v3
Fix issue in ComponentJS::~ComponentJS
This commit is contained in:
commit
efde3c3a0e
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue