eeschema: Do not clear highlights with NULL screen
When closing a project, the screen is released, so we need to avoid cross-probe calls dereferencing the screen pointer. Fixes: lp:1807501 * https://bugs.launchpad.net/kicad/+bug/1807501
This commit is contained in:
parent
4fc81bb923
commit
fd537c8230
|
@ -89,6 +89,9 @@ bool SCH_EDIT_FRAME::SetCurrentSheetHighlightFlags( std::vector<EDA_ITEM*>* aIte
|
|||
{
|
||||
SCH_SCREEN* screen = m_CurrentSheet->LastScreen();
|
||||
|
||||
if( !screen )
|
||||
return true;
|
||||
|
||||
// Disable highlight flag on all items in the current screen
|
||||
for( SCH_ITEM* ptr = screen->GetDrawItems(); ptr; ptr = ptr->Next() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue