MP Alert Options: fix crash caused by e5b09de2c6 (fixes bug #1945)

Accessing captured variable out of scope.
This commit is contained in:
Charles Dang 2017-09-07 05:44:43 +11:00
parent 84f861ddd1
commit afc58c3ba9

View file

@ -73,7 +73,7 @@ static toggle_button * setup_pref_toggle_button(const std::string & id, bool def
preferences::set(id, def);
}
connect_signal_mouse_left_click(*b, std::bind([&, id]() { preferences::set(id, b->get_value_bool()); }));
connect_signal_mouse_left_click(*b, std::bind([b, id]() { preferences::set(id, b->get_value_bool()); }));
return b;
}