]> git.saurik.com Git - wxWidgets.git/commitdiff
allow empty filename in ctor taking the extents
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 26 Jun 2006 14:39:56 +0000 (14:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 26 Jun 2006 14:39:56 +0000 (14:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/metafile.cpp

index 0092107a7c6306b666c73aed7846819a30cec94d..f1eb74391eb256cf516bc304fcf41e5e6eb963c1 100644 (file)
@@ -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;