Fix nullptr error.

Fixes https://gitlab.com/kicad/code/kicad/issues/8102
This commit is contained in:
Jeff Young 2021-04-03 11:14:21 +01:00
parent 52aea0a2c9
commit 32e8a17cc0
1 changed files with 1 additions and 2 deletions

View File

@ -1078,14 +1078,13 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent )
}
}
item->AutoplaceFields( /* aScreen */ nullptr, /* aManual */ false );
// Restore cursor after dialog
controls->WarpCursor( controls->GetCursorPosition(), true );
if( item )
{
item->SetFlags( IS_NEW | IS_MOVED );
item->AutoplaceFields( /* aScreen */ nullptr, /* aManual */ false );
updatePreview();
// update the cursor so it looks correct before another event