mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
Run: Don't try to set a history selection if history is empty
This fixes an assertion on startup when there's no command history.
This commit is contained in:
parent
c153d1779e
commit
e98f8f20df
|
@ -47,7 +47,8 @@ RunWindow::RunWindow()
|
|||
|
||||
m_path_combo_box = *main_widget.find_descendant_of_type_named<GUI::ComboBox>("path");
|
||||
m_path_combo_box->set_model(m_path_history_model);
|
||||
m_path_combo_box->set_selected_index(0);
|
||||
if (!m_path_history.is_empty())
|
||||
m_path_combo_box->set_selected_index(0);
|
||||
|
||||
m_ok_button = *main_widget.find_descendant_of_type_named<GUI::DialogButton>("ok_button");
|
||||
m_ok_button->on_click = [this](auto) {
|
||||
|
|
Loading…
Reference in a new issue