mirror of https://github.com/axmolengine/axmol.git
Find another instance where we should null out the node pointer for the current listener after it has been disassociated with the node.
This commit is contained in:
parent
8ca3cf8a93
commit
0f729126f0
|
@ -1218,6 +1218,7 @@ void EventDispatcher::removeEventListenersForListenerID(const EventListener::Lis
|
||||||
if (l->getSceneGraphPriority() != nullptr)
|
if (l->getSceneGraphPriority() != nullptr)
|
||||||
{
|
{
|
||||||
dissociateNodeAndEventListener(l->getSceneGraphPriority(), l);
|
dissociateNodeAndEventListener(l->getSceneGraphPriority(), l);
|
||||||
|
l->setSceneGraphPriority(nullptr); // NULL out the node pointer so we don't have any dangling pointers to destroyed nodes.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_inDispatch == 0)
|
if (_inDispatch == 0)
|
||||||
|
|
Loading…
Reference in New Issue