fix continuousWorker in the custom module by capturing the buffer by reference.
This commit is contained in:
parent
0332d2ebf8
commit
3ebf2d96e5
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue