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:
parent
27661edff6
commit
ae37ae7072
|
@ -398,7 +398,7 @@ void PANEL_PACKAGES_VIEW::OnInstallVersionClicked( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
const auto rows = m_gridVersions->GetSelectedRows();
|
const auto rows = m_gridVersions->GetSelectedRows();
|
||||||
|
|
||||||
if( m_currentSelected && rows.size() != 1 )
|
if( !m_currentSelected || rows.size() != 1 )
|
||||||
{
|
{
|
||||||
wxBell();
|
wxBell();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue