mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-22 23:48:08 -05:00
retain node in handleTouchPriority
This commit is contained in:
parent
7f509e5297
commit
2d13d4f84f
1 changed files with 2 additions and 0 deletions
|
@ -500,6 +500,7 @@ void GEODE_DLL geode::cocos::handleTouchPriorityWith(cocos2d::CCNode* node, int
|
|||
}
|
||||
}
|
||||
void GEODE_DLL geode::cocos::handleTouchPriority(cocos2d::CCNode* node, bool force) {
|
||||
node->retain();
|
||||
Loader::get()->queueInMainThread([node, force]() {
|
||||
if (auto delegate = typeinfo_cast<CCTouchDelegate*>(node)) {
|
||||
if (auto handler = CCTouchDispatcher::get()->findHandler(delegate)) {
|
||||
|
@ -507,6 +508,7 @@ void GEODE_DLL geode::cocos::handleTouchPriority(cocos2d::CCNode* node, bool for
|
|||
}
|
||||
}
|
||||
handleTouchPriorityWith(node, 0, force);
|
||||
node->release();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue