diff --git a/launcher/shutdown.cpp b/launcher/shutdown.cpp index 578498b..769d89c 100644 --- a/launcher/shutdown.cpp +++ b/launcher/shutdown.cpp @@ -22,11 +22,6 @@ namespace launcher { // (e.g., crashing, and then closing the window) // therefore, subsystems need to be guarded against multiple unload attempts log_info("launcher", "stopping subsystems"); - on_shutdown(); //_BUG: not thread safe, required? - on_shutdown = []() {}; - - // flush/stop logger - logger::stop(); // stop ea server easrv_shutdown(); @@ -46,6 +41,14 @@ namespace launcher { // unload nvapi and free library (if loaded) nvapi::unload(); + + // dynamic main cleanup _BUG: not thread safe, required? + on_shutdown(); + on_shutdown = []() {}; + + // flush/stop logger + logger::stop(); + } void kill(UINT exit_code) {