PCM: Prevent crash on clicking "Install" when there is no versions

Fixes https://gitlab.com/kicad/code/kicad/issues/9585
This commit is contained in:
Mikolaj Wielgus 2021-11-10 00:35:33 +01:00 committed by Ian McInerney
parent 27661edff6
commit ae37ae7072
1 changed files with 1 additions and 1 deletions

View File

@ -398,7 +398,7 @@ void PANEL_PACKAGES_VIEW::OnInstallVersionClicked( wxCommandEvent& event )
{
const auto rows = m_gridVersions->GetSelectedRows();
if( m_currentSelected && rows.size() != 1 )
if( !m_currentSelected || rows.size() != 1 )
{
wxBell();
return;