YimMenu icon indicating copy to clipboard operation
YimMenu copied to clipboard

Unload menu correctly if an error occurs on init

Open Yimura opened this issue 3 years ago • 0 comments

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:

  1. Cause the settings loader to throw an exception
  2. Inject menu
  3. Menu will fail to initialize but catch the json error.
  4. 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

Yimura avatar Mar 03 '22 10:03 Yimura