fix for crash when using user-dashed lines (patch 801663)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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};
|
||||
|
Reference in New Issue
Block a user