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

diff --git a/src/os2/pen.cpp b/src/os2/pen.cpp
index b5699b6ae4..4079248642 100644
--- a/src/os2/pen.cpp
+++ b/src/os2/pen.cpp
@@ -193,6 +193,8 @@ bool wxPen::RealizeResource()
         }
         m_vLineBundle.lColor     = (LONG)vPmColour;
         m_vLineBundle.usMixMode  = FM_OVERPAINT;
+        if (M_PENDATA->m_nWidth < 1)
+            M_PENDATA->m_nWidth = 1;
         m_vLineBundle.fxWidth    = M_PENDATA->m_nWidth;
         m_vLineBundle.lGeomWidth = M_PENDATA->m_nWidth;
         m_vLineBundle.usType     = uLineType;