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:
Vadim Zeitlin
2003-09-22 12:20:39 +00:00
parent a63b9404f6
commit 375fc5a970
3 changed files with 13 additions and 0 deletions

View File

@@ -66,6 +66,7 @@ wxMSW:
wxGTK:
- fixes to wxTextCtrl scrolling under GTK2 (Nerijus Baliunas)
- fix for crash when using user-dashed lines (Chris Borgolte)
2.5.0

View 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};

View 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};