Fix possible null dereference (from Coverity scan).

This commit is contained in:
Jeff Young 2020-01-10 17:22:23 +00:00
parent c27e278e58
commit 8abfc13053
1 changed files with 1 additions and 1 deletions

View File

@ -179,7 +179,7 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
{
SCH_ITEM* sch_item = (SCH_ITEM*) selection.Front();
bool appendUndo = sch_item && sch_item->IsNew();
bool placingNewItems = sch_item->IsNew();
bool placingNewItems = sch_item && sch_item->IsNew();
//------------------------------------------------------------------------
// Setup a drag or a move