ui: fix crash when no profile is created and typing in the exe entry

This commit is contained in:
arylix 2025-07-25 21:42:43 +02:00 committed by Pancake
parent 39665a90d2
commit 31b3f770f5

View file

@ -35,9 +35,12 @@ pub fn register_signals(sidebar_: pane::PaneSidebar, main: &pane::PaneMain) {
}
// rename list entry
let row = sidebar.imp().profiles.selected_row()
.and_downcast::<entry::Entry>().unwrap();
row.set_exe(exe.clone());
let row_option = sidebar.imp().profiles.selected_row()
.and_downcast::<entry::Entry>();
if let Some(row) = row_option {
row.set_exe(exe.clone());
}
// update the game configuration
update_game(|conf| {