diff --git a/loader/src/utils/cocos.cpp b/loader/src/utils/cocos.cpp index e7db8687..d4bf49f9 100644 --- a/loader/src/utils/cocos.cpp +++ b/loader/src/utils/cocos.cpp @@ -479,6 +479,9 @@ void geode::cocos::reloadTextures(CreateLayerFunc returnTo) { } void GEODE_DLL geode::cocos::handleTouchPriorityWith(cocos2d::CCNode* node, int priority, bool force) { + if (node == nullptr) return; + if (node->getChildrenCount() == 0) return; + for (auto child : CCArrayExt(node->getChildren())) { if (auto delegate = typeinfo_cast(child)) { if (auto handler = CCTouchDispatcher::get()->findHandler(delegate)) {