From 32e8a17cc052b4afdebde1e37d0a83705e792a49 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 3 Apr 2021 11:14:21 +0100 Subject: [PATCH] Fix nullptr error. Fixes https://gitlab.com/kicad/code/kicad/issues/8102 --- eeschema/tools/sch_drawing_tools.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp index ccd7fa952c..eed93540f6 100644 --- a/eeschema/tools/sch_drawing_tools.cpp +++ b/eeschema/tools/sch_drawing_tools.cpp @@ -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