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
commit 06eea59a65
Notes: sideshowbarker 2024-07-19 02:43:03 +09:00

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) {