mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
WindowServer: Don't crash when encountering unsorted menu applets
Fixes #1862.
This commit is contained in:
parent
98b990f20b
commit
3b434068eb
1 changed files with 1 additions and 3 deletions
|
@ -79,9 +79,7 @@ void AppletManager::add_applet(Window& applet)
|
|||
quick_sort(m_applets, [](auto& a, auto& b) {
|
||||
auto index_a = order_vector.find_first_index(a->title());
|
||||
auto index_b = order_vector.find_first_index(b->title());
|
||||
ASSERT(index_a.has_value());
|
||||
ASSERT(index_b.has_value());
|
||||
return index_a.value() > index_b.value();
|
||||
return index_a.value_or("") > index_b.value_or("");
|
||||
});
|
||||
|
||||
calculate_applet_rects(MenuManager::the().window());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue