mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:57:45 +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
1 changed files with 2 additions and 2 deletions
|
@ -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_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_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_month_combo.on_change = [update_starting_day_range](auto, auto) { update_starting_day_range(); };
|
||||||
|
|
||||||
event_title_textbox.set_focus(true);
|
event_title_textbox.set_focus(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue