mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2025-10-30 07:01:10 +00:00
ui: fix a crash
This commit is contained in:
parent
008344f3a8
commit
979fd0481b
1 changed files with 6 additions and 8 deletions
|
|
@ -39,16 +39,14 @@ pub fn add_entry(entry_: entry::Entry, profiles_: gtk::ListBox) {
|
|||
profiles.remove(&entry);
|
||||
|
||||
// select next entry
|
||||
let idx = entry.index() as usize;
|
||||
if idx == 0 {
|
||||
let state = STATE.get().unwrap().clone();
|
||||
if let Ok(mut state) = state.write() {
|
||||
state.selected_game = None;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
profiles.row_at_index(0).unwrap().activate();
|
||||
if let Some(entry) = profiles.row_at_index(0) {
|
||||
entry.activate();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue