From e5df2a5d5b1cada2f03f58e72e23d8c40bdcb085 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 14 Feb 2019 10:31:39 +0100 Subject: [PATCH] WindowServer: Post error if trying to destroy non-existent menubar. --- WindowServer/WSClientConnection.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/WindowServer/WSClientConnection.cpp b/WindowServer/WSClientConnection.cpp index a2412fd384..166ae62554 100644 --- a/WindowServer/WSClientConnection.cpp +++ b/WindowServer/WSClientConnection.cpp @@ -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;