From 611fcc2f19fff647c846ae96be7bb15540766383 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 4 Jan 2023 10:51:48 -0800 Subject: [PATCH] Initialize m_originalBitmap when loading PNG data Fixes https://gitlab.com/kicad/code/kicad/issues/13374 --- common/bitmap_base.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/bitmap_base.cpp b/common/bitmap_base.cpp index f6851caa54..9b547a3ac9 100644 --- a/common/bitmap_base.cpp +++ b/common/bitmap_base.cpp @@ -225,6 +225,7 @@ bool BITMAP_BASE::LoadData( LINE_READER& aLine, wxString& aErrorMsg ) wxMemoryInputStream istream( stream ); m_image->LoadFile( istream, wxBITMAP_TYPE_PNG ); m_bitmap = new wxBitmap( *m_image ); + m_originalImage = new wxImage( *m_image ); break; }