Eeschema: fix crash when opening preferences, due to null pointer.
In panel preview, Schematic() returns a null pointer. Fixes #7869 https://gitlab.com/kicad/code/kicad/issues/7869
This commit is contained in:
parent
db1f457ff9
commit
2bc22de1a5
|
@ -1353,7 +1353,8 @@ const EDA_RECT SCH_GLOBALLABEL::GetBoundingBox() const
|
|||
|
||||
EDA_RECT box( GetBoundingBoxBase() );
|
||||
|
||||
if( Schematic()->Settings().m_IntersheetRefsShow )
|
||||
// Note: Schematic() can be null in preference preview panel
|
||||
if( Schematic() && Schematic()->Settings().m_IntersheetRefsShow )
|
||||
{
|
||||
box.Merge( m_intersheetRefsField.GetBoundingBox() );
|
||||
box.Normalize();
|
||||
|
|
Loading…
Reference in New Issue