From 1368ba64b587ae392b8119b31cb76bb62baecd6b Mon Sep 17 00:00:00 2001 From: David Delarosa Date: Thu, 13 Apr 2023 17:16:37 +0300 Subject: [PATCH] Fix segfault in destructor --- src/modules/dwl/tags.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/dwl/tags.cpp b/src/modules/dwl/tags.cpp index 7d40882d..88d932a8 100644 --- a/src/modules/dwl/tags.cpp +++ b/src/modules/dwl/tags.cpp @@ -148,10 +148,11 @@ Tags::Tags(const std::string &id, const waybar::Bar &bar, const Json::Value &con zdwl_output_v1_add_listener(output_status_, &output_status_listener_impl, this); zdwl_manager_v1_destroy(status_manager_); + status_manager_ = nullptr; } Tags::~Tags() { - if (output_status_) { + if (status_manager_) { zdwl_manager_v1_destroy(status_manager_); } }