1
0
mirror of synced 2024-11-28 17:40:51 +01:00

sys: Properly delete data provider on exit

This commit is contained in:
WerWolv 2021-03-09 19:32:04 +01:00
parent f2f6dd2219
commit 2326e090af
2 changed files with 5 additions and 3 deletions

View File

@ -229,7 +229,6 @@ namespace hex {
} }
} }
ImGui::EndChild(); ImGui::EndChild();
} }
ImGui::End(); ImGui::End();

View File

@ -54,8 +54,9 @@ namespace hex {
} }
Window::Window(int &argc, char **&argv) { Window::Window(int &argc, char **&argv) {
hex::SharedData::mainArgc = argc; SharedData::mainArgc = argc;
hex::SharedData::mainArgv = argv; SharedData::mainArgv = argv;
SharedData::currentProvider = nullptr;
this->createDirectories(); this->createDirectories();
this->initGLFW(); this->initGLFW();
@ -155,6 +156,8 @@ namespace hex {
} }
Window::~Window() { Window::~Window() {
delete SharedData::currentProvider;
this->deinitImGui(); this->deinitImGui();
this->deinitGLFW(); this->deinitGLFW();
ContentRegistry::Settings::store(); ContentRegistry::Settings::store();