File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed
Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 1+ ## 2.0.3
2+ - Fix a cocos bug
3+
14## 2.0.2
25- Bug fix
36
Original file line number Diff line number Diff line change 11{
2- "geode" : " 4.6.1 " ,
2+ "geode" : " 4.6.2 " ,
33 "gd" : {
44 "win" : " 2.2074" ,
55 "android" : " 2.2074" ,
66 "mac" : " 2.2074" ,
77 "ios" : " 2.2074"
88 },
9- "version" : " v2.0.2 " ,
9+ "version" : " v2.0.3 " ,
1010 "id" : " alphalaneous.happy_textures" ,
1111 "name" : " Happy Textures :3" ,
1212 "developer" : " Alphalaneous" ,
Original file line number Diff line number Diff line change 33#include < Geode/Geode.hpp>
44#include < Geode/modify/CCObject.hpp>
55#include < Geode/modify/CCPoolManager.hpp>
6+ #include < Geode/modify/CCDictionary.hpp>
67#include " UIModding.hpp"
78#include " nodes/CCNode.hpp"
89#include " Utils.hpp"
@@ -37,6 +38,22 @@ class LateQueue {
3738};
3839LateQueue* LateQueue::instance = nullptr ;
3940
41+ class $modify(CCDictionary) {
42+
43+ // Cocos will call autorelease on a nullptr here for some reason,
44+ // it doesn't crash due to no member access but will crash with this
45+ // mod since I retain and release which access m_uReference
46+
47+ static CCDictionary* createWithContentsOfFile (const char *pFileName) {
48+ if (auto ret = CCDictionary::createWithContentsOfFileThreadSafe (pFileName)) {
49+ ret->autorelease ();
50+ return ret;
51+ }
52+
53+ return nullptr ;
54+ }
55+ };
56+
4057class $modify(CCObject) {
4158
4259 CCObject* autorelease () {
You can’t perform that action at this time.
0 commit comments