Browse Source

SCH_MARKER::SerializeToString): protect against null pointer

jobs
jean-pierre charras 1 year ago
parent
commit
8128f4ebd9
  1. 4
      eeschema/sch_marker.cpp

4
eeschema/sch_marker.cpp

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -114,7 +114,7 @@ wxString SCH_MARKER::SerializeToString() const
// exclusion must refer to the parent's KIID, and include the text of the original text
// item for later look-up.
if( parent->IsType( { SCH_SYMBOL_T, SCH_LABEL_T, SCH_SHEET_T } ) )
if( parent && parent->IsType( { SCH_SYMBOL_T, SCH_LABEL_T, SCH_SHEET_T } ) )
{
return wxString::Format( wxT( "%s|%d|%d|%s|%s|%s|%s|%s" ),
m_rcItem->GetSettingsKey(),

Loading…
Cancel
Save