diff --git a/include/wx/mac/carbon/metafile.h b/include/wx/mac/carbon/metafile.h index 119ed37967..4188807b8a 100644 --- a/include/wx/mac/carbon/metafile.h +++ b/include/wx/mac/carbon/metafile.h @@ -102,8 +102,9 @@ class WXDLLEXPORT wxMetafileDC: public wxDC // the metafile picture size and the optional description/comment wxMetafileDC( const wxString& filename = wxEmptyString, int width = 0, int height = 0, - const wxString& description = wxEmptyString ) - { m_pimpl = new wxMetafileDCImpl( this, filename, width, height, description ); } + const wxString& description = wxEmptyString ) : + wxDC( new wxMetafileDCImpl( this, filename, width, height, description) ) + { } wxMetafile *GetMetafile() const { return ((wxMetafileDCImpl*)m_pimpl)->GetMetaFile(); }