]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dcclient.cpp
TransferFrom/ToWindow() were reverted, fixed
[wxWidgets.git] / src / gtk / dcclient.cpp
index 47c3ec21743280d65a921ed0d5d1e4c6342056ef..92ae53ff9d9b6af8ce7754fb08d46ec8733c45aa 100644 (file)
@@ -1838,6 +1838,12 @@ void wxWindowDC::SetPen( const wxPen &pen )
                    ( fabs((double) XLOG2DEVREL(width)) +
                      fabs((double) YLOG2DEVREL(width)) ) / 2.0;
         width = (int)w;
+        if ( !width )
+        {
+            // width can't be 0 or an internal GTK error occurs inside
+            // gdk_gc_set_dashes() below
+            width = 1;
+        }
     }
 
     static const wxGTKDash dotted[] = {1, 1};