From 3ebf2d96e529c0ccba05273805693adbd863527d Mon Sep 17 00:00:00 2001 From: Taimase Date: Wed, 11 Jun 2025 01:12:08 -0600 Subject: [PATCH] fix continuousWorker in the custom module by capturing the buffer by reference. --- src/modules/custom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/custom.cpp b/src/modules/custom.cpp index e023aaf6..052247e0 100644 --- a/src/modules/custom.cpp +++ b/src/modules/custom.cpp @@ -62,7 +62,7 @@ void waybar::modules::Custom::continuousWorker() { } thread_ = [this, cmd] { char* buff = nullptr; - waybar::util::ScopeGuard buff_deleter([buff]() { + waybar::util::ScopeGuard buff_deleter([&buff]() { if (buff) { free(buff); }