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 ) )