X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb46a9a6c6f291806a5fecbb848930c344e17e11..b704229ee25ef8e5765ec09e9c164f59063564e8:/src/os2/pen.cpp

diff --git a/src/os2/pen.cpp b/src/os2/pen.cpp
index 48da7cb434..905a09021b 100644
--- a/src/os2/pen.cpp
+++ b/src/os2/pen.cpp
@@ -24,6 +24,8 @@
 #include "wx/os2/private.h"
 #include "assert.h"
 
+IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
+
 wxPenRefData::wxPenRefData()
 {
     m_style = wxSOLID;
@@ -140,6 +142,11 @@ bool wxPen::FreeResource(bool force)
     else return FALSE;
 }
 
+bool wxPen::IsFree() const
+{
+  return (M_PENDATA && M_PENDATA->m_hPen == 0);
+}
+
 void wxPen::Unshare()
 {
     // Don't change shared data
@@ -231,7 +238,7 @@ void wxPen::SetCap(int Cap)
 
 int wx2os2PenStyle(int wx_style)
 {
-    int cstyle;
+    int cstyle = 0;
 // TODO:
 /*
     switch (wx_style)