Test for wxPen validity before testing for its style in wxGTK wxDC.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 3 Jun 2010 10:35:49 +0000 (10:35 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 3 Jun 2010 10:35:49 +0000 (10:35 +0000)
commit1b46c6697fd61c8a00978f7f2e587fd72de505b8
tree19423b25238c19b54d10b6adcd1b7c0b1870d4c9
parente612dec202d38cf6dd32e6d49cafaf9243f77706
Test for wxPen validity before testing for its style in wxGTK wxDC.

Calling wxPen::GetStyle() on an invalid pen resulted in an assert, breaking
the grid column drawing while reordering them, for example, because the code
in wxGrid uses wxDC::DrawRectangle() after calling SetPen(wxNullPen).

Fix this by testing for the pen validity first.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/gtk/dcclient.cpp