From bab61dd2496d5ddf86627d4d3a60df198043c27d Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Sat, 8 Aug 2020 23:24:36 +0100 Subject: [PATCH] Initialize clear annotation variable to false so they aren't cleared by accident When it was uninitialized, cancelling the dialog could lead to the sheet's annotations being cleared because the variable wasn't set to false anywhere. --- eeschema/schedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 6deb06e572..47a1c38bbf 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -1057,7 +1057,7 @@ void SCH_EDIT_FRAME::OnEditItem( wxCommandEvent& aEvent ) case SCH_SHEET_T: { - bool doClearAnnotation; + bool doClearAnnotation = false; bool doRefresh = false; // Keep trace of existing sheet paths. EditSheet() can modify this list SCH_SHEET_LIST initial_sheetpathList( g_RootSheet );