1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 22:15:06 +00:00

WindowServer: Post error if trying to destroy non-existent menubar.

This commit is contained in:
Andreas Kling 2019-02-14 10:31:39 +01:00
parent 5d30c6b00c
commit e5df2a5d5b

View file

@ -103,8 +103,7 @@ void WSClientConnection::handle_request(WSAPIDestroyMenubarRequest& request)
int menubar_id = request.menubar_id();
auto it = m_menubars.find(menubar_id);
if (it == m_menubars.end()) {
ASSERT_NOT_REACHED();
// FIXME: Send an error.
post_error("Bad menubar ID");
return;
}
auto& menubar = *(*it).value;