mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:07:43 +00:00
LibGUI: Make clipboard-as-bitmap parsing less data-race-y
This encourages the caller to first fetch data and type atomically, and then parse that, instead of potentially making multiple requests.
This commit is contained in:
parent
55526634b6
commit
b6419f2cf2
3 changed files with 13 additions and 12 deletions
|
@ -214,7 +214,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
|||
auto* editor = current_image_editor();
|
||||
if (!editor)
|
||||
return;
|
||||
auto bitmap = GUI::Clipboard::the().bitmap();
|
||||
auto bitmap = GUI::Clipboard::the().data_and_type().as_bitmap();
|
||||
if (!bitmap)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue