From d988a94acba127d7cf189eb391d81b0ff8ed992a Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sun, 1 Feb 2015 18:06:06 +0000 Subject: [PATCH] avoid passing invalid rect to Refresh(), closes #16819 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 6d7815a3ab..720db75ed4 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -2114,7 +2114,8 @@ void wxGridWindow::OnFocus(wxFocusEvent& event) m_owner->GetGridCursorCol()); const wxRect cursor = m_owner->BlockToDeviceRect(cursorCoords, cursorCoords); - Refresh(true, &cursor); + if (cursor != wxGridNoCellRect) + Refresh(true, &cursor); } if ( !m_owner->GetEventHandler()->ProcessEvent( event ) )