Symbol editor crash: Fix use of a null pointer.
LIB_TEXT::Clone() did not copy a member set to nullptr. From Master branch Fixes #11569 https://gitlab.com/kicad/code/kicad/issues/11569
This commit is contained in:
parent
6971e409bf
commit
ed153bd7d7
|
@ -73,6 +73,7 @@ EDA_ITEM* LIB_TEXT::Clone() const
|
|||
{
|
||||
LIB_TEXT* newitem = new LIB_TEXT( nullptr );
|
||||
|
||||
newitem->m_parent = m_parent;
|
||||
newitem->m_unit = m_unit;
|
||||
newitem->m_convert = m_convert;
|
||||
newitem->m_flags = m_flags;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2019 CERN
|
||||
* Copyright (C) 2019-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2019-2022 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
|
||||
|
@ -133,6 +133,8 @@ protected:
|
|||
///< parents.
|
||||
void saveCopyInUndoList( EDA_ITEM* aItem, UNDO_REDO aType, bool aAppend = false )
|
||||
{
|
||||
wxASSERT( aItem );
|
||||
|
||||
KICAD_T itemType = aItem->Type();
|
||||
bool selected = aItem->IsSelected();
|
||||
|
||||
|
|
Loading…
Reference in New Issue