X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68df211faedeabdf4259858109d1bd7385fdccf5..3d63133a5ef146494fa821c76c705e535990086a:/src/msw/metafile.cpp?ds=sidebyside diff --git a/src/msw/metafile.cpp b/src/msw/metafile.cpp index 0092107a7c..f1eb74391e 100644 --- a/src/msw/metafile.cpp +++ b/src/msw/metafile.cpp @@ -189,9 +189,9 @@ wxMetafileDC::wxMetafileDC(const wxString& file, int xext, int yext, int xorg, i m_minY = 10000; m_maxX = -10000; m_maxY = -10000; - if ( !file.empty() && wxFileExists(file)) + if ( !file.empty() && wxFileExists(file) ) wxRemoveFile(file); - m_hDC = (WXHDC) CreateMetaFile(file); + m_hDC = (WXHDC) CreateMetaFile(file.empty() ? NULL : file.c_str()); m_ok = true;