From 78c7ef5b46693f4584b4aac348f469171d7a92e0 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sat, 6 Apr 2024 11:56:18 +0200 Subject: [PATCH] fix main screen destruction order, so plugins can cleanup before their facilities get destroyed --- src/main_screen.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main_screen.hpp b/src/main_screen.hpp index 301d6956..27f7d7bd 100644 --- a/src/main_screen.hpp +++ b/src/main_screen.hpp @@ -48,8 +48,6 @@ struct MainScreen final : public Screen { RegistryMessageModel rmm; MessageTimeSort mts; - PluginManager pm; - ToxEventLogger tel{std::cout}; ToxClient tc; ToxPrivateImpl tpi; @@ -75,6 +73,8 @@ struct MainScreen final : public Screen { ToxUIUtils tuiu; ToxDHTCapHisto tdch; + PluginManager pm; // last, so it gets destroyed first + bool _show_tool_style_editor {false}; bool _show_tool_metrics {false}; bool _show_tool_debug_log {false};