mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
Calendar: Fix crash when changing event date
We were capturing by reference which lead to the variables going out of scope even when used in the lambda. Due to this the update_starting_day_range lambda crashes when called.
This commit is contained in:
parent
eb0f5bd65e
commit
086fccc2af
Notes:
sideshowbarker
2024-07-17 06:27:12 +09:00
Author: https://github.com/monroeclinton Commit: https://github.com/SerenityOS/serenity/commit/086fccc2af Pull-request: https://github.com/SerenityOS/serenity/pull/15436
|
@ -107,8 +107,8 @@ AddEventDialog::AddEventDialog(Core::DateTime date_time, Window* parent_window)
|
|||
starting_day_combo.set_range(1, days_in_month(year, month + 1));
|
||||
};
|
||||
|
||||
starting_year_combo.on_change = [&update_starting_day_range](auto) { update_starting_day_range(); };
|
||||
starting_month_combo.on_change = [&update_starting_day_range](auto, auto) { update_starting_day_range(); };
|
||||
starting_year_combo.on_change = [update_starting_day_range](auto) { update_starting_day_range(); };
|
||||
starting_month_combo.on_change = [update_starting_day_range](auto, auto) { update_starting_day_range(); };
|
||||
|
||||
event_title_textbox.set_focus(true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue