mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05: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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue