From 8ae15abb85a39cdea8c4da20ecea1eb8ebee84fc Mon Sep 17 00:00:00 2001 From: WerWolv Date: Tue, 12 Jan 2021 16:56:14 +0100 Subject: [PATCH] Fixed plugin unloading segfault --- source/main.cpp | 2 -- source/window.cpp | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/main.cpp b/source/main.cpp index f2a50c34c..b37c6f403 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -49,10 +49,8 @@ int main(int argc, char **argv) { hex::View::postEvent(hex::Events::FileDropped, argv[1]); window.initPlugins(); - window.loop(); - window.deinitPlugins(); return EXIT_SUCCESS; } diff --git a/source/window.cpp b/source/window.cpp index af4937369..25d3a277a 100644 --- a/source/window.cpp +++ b/source/window.cpp @@ -65,6 +65,8 @@ namespace hex { for (auto &view : ContentRegistry::Views::getEntries()) delete view; ContentRegistry::Views::getEntries().clear(); + + this->deinitPlugins(); } void Window::loop() {