Fix issue: "Malformed footprint causes crash on load" (in fact, no crash: just an assert dialog is shown)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2015 SoftPLC Corporation, Dick Hollenbeck <[email protected]>
|
||||
* Copyright (C) 2015 Wayne Stambaugh <[email protected]>
|
||||
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2016 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
|
||||
@@ -900,6 +900,10 @@ void MODULE::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||
|
||||
switch( m_Layer )
|
||||
{
|
||||
|
||||
default:
|
||||
wxASSERT_MSG( false, "Illegal layer" ); // do you really have modules placed on other layers?
|
||||
// pass through
|
||||
case F_Cu:
|
||||
aLayers[1] = ITEM_GAL_LAYER( MOD_FR_VISIBLE );
|
||||
break;
|
||||
@@ -907,10 +911,6 @@ void MODULE::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||
case B_Cu:
|
||||
aLayers[1] = ITEM_GAL_LAYER( MOD_BK_VISIBLE );
|
||||
break;
|
||||
|
||||
default:
|
||||
assert( false ); // do you really have modules placed on inner layers?
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user