From 18ebced8f40038a06aa70abcad1b391f52f69379 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 15 Jun 2019 20:31:20 +0100 Subject: [PATCH] Code hygiene. --- common/tool/tool_manager.cpp | 2 +- eeschema/tools/sch_drawing_tools.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index bad4d5e005..c3a745543d 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -529,7 +529,7 @@ void TOOL_MANAGER::dispatchInternal( const TOOL_EVENT& aEvent ) } // the tool state handler is waiting for events (i.e. called Wait() method) - if( st->pendingWait ) + if( st && st->pendingWait ) { if( st->waitEvents.Matches( aEvent ) ) { diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp index 5eb23a53c0..5db687c9c0 100644 --- a/eeschema/tools/sch_drawing_tools.cpp +++ b/eeschema/tools/sch_drawing_tools.cpp @@ -524,6 +524,8 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent ) case SCH_BUS_BUS_ENTRY_T: item = new SCH_BUS_BUS_ENTRY( cursorPos, g_lastBusEntryShape ); break; + default: + break; } } @@ -665,6 +667,8 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) item = m_frame->CreateSheetPin( sheet, label ); break; } + default: + break; } // Restore cursor after dialog