diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 6fc8c1dded..a49ed0836a 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -2102,7 +2102,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 ) )