improve ccmenuitem activate crash fix

This commit is contained in:
Cvolton 2024-03-16 02:26:20 +01:00
parent e4ab8819f5
commit 7f9dcc6b95
No known key found for this signature in database

View file

@ -1,5 +1,6 @@
#include <Geode/Geode.hpp>
#include <Geode/modify/CCMenuItem.hpp>
#include <Geode/modify/CCMenu.hpp>
using namespace geode::prelude;
@ -10,3 +11,11 @@ class $modify(CCMenuItem) {
this->release();
}
};
class $modify(CCMenu) {
void ccTouchEnded(CCTouch* touch, CCEvent* event) {
this->retain();
CCMenu::ccTouchEnded(touch, event);
this->release();
}
};