From 06eea59a65d90918bb4f064163d290413e29d476 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sat, 12 Sep 2020 12:39:34 +0100 Subject: 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() --- Libraries/LibGfx/GIFLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Libraries') 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) { -- cgit v1.2.3