]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dc.cpp
fix for potention crash when conversion fails
[wxWidgets.git] / src / msw / dc.cpp
index ca841ef82304c5e0c0f9dcf91f321c96f00f81d2..11570c8c40e1afef4fa11d973ec704fce2eeb853 100644 (file)
     #include "wx/dcmemory.h"
     #include "wx/log.h"
     #include "wx/icon.h"
     #include "wx/dcmemory.h"
     #include "wx/log.h"
     #include "wx/icon.h"
+    #include "wx/dcprint.h"
 #endif
 
 #include "wx/sysopt.h"
 #endif
 
 #include "wx/sysopt.h"
-#include "wx/dcprint.h"
 #include "wx/module.h"
 #include "wx/dynlib.h"
 
 #include "wx/module.h"
 #include "wx/dynlib.h"
 
@@ -1488,7 +1488,7 @@ void wxDC::SetFont(const wxFont& font)
         else // selected ok
         {
             if ( !m_oldFont )
         else // selected ok
         {
             if ( !m_oldFont )
-                m_oldFont = (WXHPEN)hfont;
+                m_oldFont = (WXHFONT)hfont;
 
             m_font = font;
         }
 
             m_font = font;
         }
@@ -1581,7 +1581,7 @@ void wxDC::SetBrush(const wxBrush& brush)
         else // selected ok
         {
             if ( !m_oldBrush )
         else // selected ok
         {
             if ( !m_oldBrush )
-                m_oldBrush = (WXHPEN)hbrush;
+                m_oldBrush = (WXHBRUSH)hbrush;
 
             m_brush = brush;
         }
 
             m_brush = brush;
         }