mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 16:16:43 +00:00
WindowServer: Don't crash when encountering unsorted menu applets
Fixes #1862.
This commit is contained in:
parent
98b990f20b
commit
3b434068eb
Notes:
sideshowbarker
2024-07-19 07:27:25 +09:00
Author: https://github.com/awesomekling
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