avoid use-after-free in lambda

This commit is contained in:
Andy Russell 2022-03-03 19:40:43 -05:00
parent 4635e8c5f8
commit 54085dbde0
No known key found for this signature in database
GPG Key ID: BE2221033EDBC374

View File

@ -750,7 +750,7 @@ void waybar::Bar::getModules(const Factory& factory, const std::string& pos, Gtk
modules_right_.emplace_back(module_sp);
}
}
module->dp.connect([module, &name] {
module->dp.connect([module, name] {
try {
module->update();
} catch (const std::exception& e) {