Browse Source

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

Andreas Kling 6 năm trước cách đây
mục cha
commit
e5df2a5d5b
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      WindowServer/WSClientConnection.cpp

+ 1 - 2
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;