Skip to content

Commit

Permalink
LibGfx: return clone from frame() instead of underlying framebuffer
Browse files Browse the repository at this point in the history
This prevents frame() from modifying the contents of the same bitmap
that was returned from previous calls to frame()
  • Loading branch information
peterdn authored and awesomekling committed Sep 12, 2020
1 parent 9494b03 commit 06eea59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/LibGfx/GIFLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 06eea59

Please sign in to comment.