1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:17:44 +00:00

LibGfx: Propagate errors from serializing bitmaps

We essentially just end up moving `release_value_but_fixme_...` one
layer down, but it makes adding more fallible operations in the
serialization function more comfortable.
This commit is contained in:
Tim Schumacher 2023-02-08 18:21:41 +01:00 committed by Linus Groh
parent 81863eaf57
commit 6ea3c1659a
4 changed files with 8 additions and 9 deletions

View file

@ -84,7 +84,7 @@ void DragOperation::set_bitmap(Gfx::Bitmap const* bitmap)
if (!m_mime_data)
m_mime_data = Core::MimeData::construct();
if (bitmap)
m_mime_data->set_data("image/x-raw-bitmap", bitmap->serialize_to_byte_buffer());
m_mime_data->set_data("image/x-raw-bitmap", bitmap->serialize_to_byte_buffer().release_value_but_fixme_should_propagate_errors());
}
void DragOperation::set_data(DeprecatedString const& data_type, DeprecatedString const& data)
{