Check for invalid library pin object pointer.

This commit is contained in:
Wayne Stambaugh 2024-01-31 12:13:23 -05:00
parent 7276486756
commit 466c707e91
2 changed files with 10 additions and 3 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2018 CERN
* Copyright (C) 2019-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2019-2024 KiCad Developers, see AUTHORS.txt for contributors.
* @author Jon Evans <jon@craftyjon.com>
*
* This program is free software; you can redistribute it and/or
@ -272,6 +272,13 @@ bool SCH_PIN::IsStacked( const SCH_PIN* aPin ) const
}
bool SCH_PIN::IsGlobalPower() const
{
wxCHECK( m_libPin, false );
return m_libPin->IsGlobalPower();
}
void SCH_PIN::ClearDefaultNetName( const SCH_SHEET_PATH* aPath )
{
std::lock_guard<std::recursive_mutex> lock( m_netmap_mutex );

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2018 CERN
* Copyright (C) 2019-2023 KiCad Developers, see AUTHOR.txt for contributors.
* Copyright (C) 2019-2024 KiCad Developers, see AUTHOR.txt for contributors.
* @author Jon Evans <jon@craftyjon.com>
*
* This program is free software; you can redistribute it and/or
@ -157,7 +157,7 @@ public:
int GetLength() const;
bool IsGlobalPower() const { return m_libPin->IsGlobalPower(); }
bool IsGlobalPower() const;
bool ConnectionPropagatesTo( const EDA_ITEM* aItem ) const override;