Array bounds checking for KICAD-19D.

This commit is contained in:
Jeff Young 2023-11-18 12:29:56 +00:00
parent 21d53d0b86
commit 341124d831
1 changed files with 3 additions and 1 deletions

View File

@ -32,7 +32,9 @@ wxDataViewItem WX_DATAVIEWCTRL::GetPrevItem( wxDataViewItem const& aItem )
{
wxDataViewItemArray children;
GetModel()->GetChildren( prevItem, children );
prevItem = children[children.size() - 1];
if( children.size() )
prevItem = children[children.size() - 1];
}
return prevItem;