1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

LibGfx: return clone from frame() instead of underlying framebuffer

This prevents frame() from modifying the contents of the same bitmap
that was returned from previous calls to frame()
This commit is contained in:
Peter Nelson 2020-09-12 12:39:34 +01:00 committed by Andreas Kling
parent 9494b03a02
commit 06eea59a65

View file

@ -709,7 +709,7 @@ ImageFrameDescriptor GIFImageDecoderPlugin::frame(size_t i)
}
ImageFrameDescriptor frame {};
frame.image = m_context->frame_buffer;
frame.image = m_context->frame_buffer->clone();
frame.duration = m_context->images.at(i).duration * 10;
if (frame.duration <= 10) {