From 79d8d561d6d121b1ef23c76c481bc2a45964a9ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 22 Nov 2007 13:39:26 +0000 Subject: [PATCH] don't add new PNG handler instance every time wxSVGFileImplDC::DoDrawBitmap() is called, do it only if the handler isn't installed yet git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/dcsvg.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/dcsvg.cpp b/src/common/dcsvg.cpp index 063b017bfc..924bef6440 100644 --- a/src/common/dcsvg.cpp +++ b/src/common/dcsvg.cpp @@ -649,7 +649,8 @@ void wxSVGFileImplDC::DoDrawBitmap(const class wxBitmap & bmp, wxCoord x, wxCoor if (m_graphics_changed) NewGraphics (); wxString sTmp, s, sPNG ; - wxImage::AddHandler(new wxPNGHandler); + if ( wxImage::FindHandler(wxBITMAP_TYPE_PNG) == NULL ) + wxImage::AddHandler(new wxPNGHandler); // create suitable file name sTmp.Printf ( wxT("_image%d.png"), m_sub_images); -- 2.45.2