YimMenu
YimMenu copied to clipboard
Unload menu correctly if an error occurs on init
Describe the bug Currently if the menu encounters an exception while initializing, depending on which step it failed the game can hard crash.
This can be fixed by changing the loading order in main.cpp or if the try / except is implemented differently.
To Reproduce Steps to reproduce the behavior:
- Cause the settings loader to throw an exception
- Inject menu
- Menu will fail to initialize but catch the json error.
- Because hooks are initialized before settings are loaded the game will crash because it never de-initializes hooks.
Expected behavior Not crash the game.
Additional context Related to #77