libedit: Prevent segfault when deleting part

emptyScreen() sets the current part to NULL.  This gracefully handles
the case by allowing a cleared screen when no part is currently
selected.
This commit is contained in:
Seth Hillbrand 2018-10-11 06:31:17 -07:00
parent 5c8c1cdb8f
commit 4d8534a7a6
1 changed files with 3 additions and 0 deletions

View File

@ -104,6 +104,9 @@ void SCH_VIEW::DisplayComponent( LIB_PART *aPart )
{
Clear();
if( !aPart )
return;
int fgPriority = INT_MAX / 2;
int bgPriority = 0;