From 7844602210bcae4b10f2c7b73d44286876569237 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 18 Jan 2023 01:30:40 +0000 Subject: [PATCH] Nullptr safety. --- pcbnew/pcb_base_frame.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp index 8f4fd9a90b..c3d8aa8089 100644 --- a/pcbnew/pcb_base_frame.cpp +++ b/pcbnew/pcb_base_frame.cpp @@ -85,14 +85,14 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame PCB_BASE_FRAME::~PCB_BASE_FRAME() { #if defined( KICAD_USE_3DCONNEXION ) - if( m_spaceMouse != nullptr ) - delete m_spaceMouse; + delete m_spaceMouse; #endif // Ensure m_canvasType is up to date, to save it in config m_canvasType = GetCanvas()->GetBackend(); delete m_pcb; + m_pcb = nullptr; }