Fix a few Coverity warnings (not initialized vars)

It also fixes a potential crash when closing Kicad.
This commit is contained in:
jean-pierre charras 2023-05-10 09:11:48 +02:00
parent 6e93a0cbad
commit 31d613c746
4 changed files with 13 additions and 2 deletions

View File

@ -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;
}

View File

@ -53,7 +53,10 @@ const wxChar* NL_SCHEMATIC_PLUGIN_IMPL::m_logTrace = wxT( "KI_TRACE_NL_SCHEMATIC
NL_SCHEMATIC_PLUGIN_IMPL::NL_SCHEMATIC_PLUGIN_IMPL() :
CNavigation3D( false, false ), m_viewport2D( nullptr ), m_isMoving( false )
CNavigation3D( false, false ),
m_viewport2D( nullptr ),
m_isMoving( false ),
m_viewportWidth( 0.0 )
{
PutProfileHint( "KiCAD Eeschema" );
}

View File

@ -41,7 +41,11 @@ struct LTSPICE_FILE
LTSPICE_FILE( const wxFileName& aFilename, const VECTOR2I& aOffset ) :
Name( aFilename ),
Offset( aOffset )
Offset( aOffset ),
ParentIndex( 0 ),
Sheet( nullptr ),
Screen( nullptr )
{ }
bool operator<( const LTSPICE_FILE& t ) const

View File

@ -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;
}