From fd478bf2ab3d00be7889054b4c517463e48df7ca Mon Sep 17 00:00:00 2001 From: yangyingchao Date: Mon, 19 Aug 2024 12:35:52 +0800 Subject: [PATCH] fix crash caused by use bar instance after it is freed (use-after-free) --- include/bar.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/bar.hpp b/include/bar.hpp index 43756bfd..936bc749 100644 --- a/include/bar.hpp +++ b/include/bar.hpp @@ -54,7 +54,7 @@ class BarIpcClient; } #endif // HAVE_SWAY -class Bar { +class Bar : public sigc::trackable { public: using bar_mode_map = std::map; static const bar_mode_map PRESET_MODES;