diff --git a/pcbnew/undo_redo.cpp b/pcbnew/undo_redo.cpp index 32ea033db9..1b2a96d2c0 100644 --- a/pcbnew/undo_redo.cpp +++ b/pcbnew/undo_redo.cpp @@ -477,7 +477,7 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList ) if( item->Type() == PCB_GROUP_T ) { - PCB_GROUP* group = static_cast( item ); + group = static_cast( item ); group->RunOnChildren( [&]( BOARD_ITEM* child ) {