From a42ef9de779bcccbc1e513c57d3dbbae735450f9 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 10 May 2023 09:27:08 +0200 Subject: [PATCH] Navlib: Ensure a pointer is initialized. --- eeschema/navlib/nl_schematic_plugin.cpp | 2 ++ pcbnew/navlib/nl_pcbnew_plugin.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/eeschema/navlib/nl_schematic_plugin.cpp b/eeschema/navlib/nl_schematic_plugin.cpp index 8cf2899d03..9057b1062d 100644 --- a/eeschema/navlib/nl_schematic_plugin.cpp +++ b/eeschema/navlib/nl_schematic_plugin.cpp @@ -28,6 +28,8 @@ NL_SCHEMATIC_PLUGIN::NL_SCHEMATIC_PLUGIN() { if( ADVANCED_CFG::GetCfg().m_Use3DConnexionDriver ) m_impl = new NL_SCHEMATIC_PLUGIN_IMPL(); + else + m_impl = nullptr; } diff --git a/pcbnew/navlib/nl_pcbnew_plugin.cpp b/pcbnew/navlib/nl_pcbnew_plugin.cpp index 14ac787263..4dc5ceb209 100644 --- a/pcbnew/navlib/nl_pcbnew_plugin.cpp +++ b/pcbnew/navlib/nl_pcbnew_plugin.cpp @@ -27,6 +27,8 @@ NL_PCBNEW_PLUGIN::NL_PCBNEW_PLUGIN( PCB_DRAW_PANEL_GAL* aViewport ) { if( ADVANCED_CFG::GetCfg().m_Use3DConnexionDriver ) m_impl = new NL_PCBNEW_PLUGIN_IMPL( aViewport ); + else + m_impl = nullptr; }