Fix RTTI class declarations of wxSVGFileDC

wxIMPLEMENT_DYNAMIC_CLASS requires a default constructor (no filename). Check
if m_outfile is initialized with a valid filename before using it.
This commit is contained in:
Maarten Bent
2019-08-10 22:22:32 +02:00
parent a41a8ded79
commit 26b273bef9
2 changed files with 24 additions and 3 deletions

View File

@@ -277,6 +277,7 @@ private:
size_t m_clipUniqueId;
wxDECLARE_ABSTRACT_CLASS(wxSVGFileDCImpl);
wxDECLARE_NO_COPY_CLASS(wxSVGFileDCImpl);
};
@@ -298,6 +299,14 @@ public:
void SetBitmapHandler(wxSVGBitmapHandler* handler);
void SetShapeRenderingMode(wxSVGShapeRenderingMode renderingMode);
private:
wxSVGFileDC()
: wxDC(new wxSVGFileDCImpl(this, wxString()))
{
}
wxDECLARE_DYNAMIC_CLASS(wxSVGFileDC);
};
#endif // wxUSE_SVG