Fix assert in DIALOG_EESCHEMA_CONFIG when removing many libs at once
This commit is contained in:
parent
12c1339296
commit
2bb234d3f5
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2006-2013 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2006-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -279,7 +279,7 @@ void DIALOG_EESCHEMA_CONFIG::OnRemoveLibClick( wxCommandEvent& event )
|
|||
{
|
||||
int pos = selections[selections.GetCount()-1];
|
||||
|
||||
if( pos == (int)m_ListLibr->GetCount() )
|
||||
if( pos >= (int)m_ListLibr->GetCount() )
|
||||
pos = m_ListLibr->GetCount() - 1;
|
||||
|
||||
m_ListLibr->SetSelection( pos );
|
||||
|
|
Loading…
Reference in New Issue