mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-22 23:48:08 -05:00
improve ccmenuitem activate crash fix
This commit is contained in:
parent
e4ab8819f5
commit
7f9dcc6b95
1 changed files with 9 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue