diff options
author | Peter Nelson <peter@peterdn.com> | 2020-09-12 12:39:34 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-09-12 20:26:14 +0200 |
commit | 06eea59a65d90918bb4f064163d290413e29d476 (patch) | |
tree | d673b67af3fb4a5146b24388e1a2616f6a24d0b1 /Libraries | |
parent | 9494b03a020f603c0f2a372474fb6c0a5a8a8473 (diff) | |
download | serenity-06eea59a65d90918bb4f064163d290413e29d476.zip |
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()
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibGfx/GIFLoader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGfx/GIFLoader.cpp b/Libraries/LibGfx/GIFLoader.cpp index b8897a8f9d..a57a222648 100644 --- a/Libraries/LibGfx/GIFLoader.cpp +++ b/Libraries/LibGfx/GIFLoader.cpp @@ -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) { |