UI: Prevent crash when right clicking on an unloaded image

This commit is contained in:
Gingeh 2025-01-10 20:33:27 +11:00 committed by Tim Ledbetter
parent 57479c2d4b
commit 6fd03425b2
Notes: github-actions[bot] 2025-01-12 19:30:53 +00:00
11 changed files with 43 additions and 20 deletions

View file

@ -234,7 +234,7 @@ void WebContentClient::did_request_link_context_menu(u64 page_id, Gfx::IntPoint
}
}
void WebContentClient::did_request_image_context_menu(u64 page_id, Gfx::IntPoint content_position, URL::URL const& url, ByteString const&, unsigned, Gfx::ShareableBitmap const& bitmap)
void WebContentClient::did_request_image_context_menu(u64 page_id, Gfx::IntPoint content_position, URL::URL const& url, ByteString const&, unsigned, Optional<Gfx::ShareableBitmap> const& bitmap)
{
if (auto view = view_for_page_id(page_id); view.has_value()) {
if (view->on_image_context_menu_request)