Skip to content

Commit 5c6d57b

Browse files
committed
[[ Bug 19158 ]] Prevent crash when using undo to bring back removed controls
1 parent 0a754e4 commit 5c6d57b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

docs/notes/bugfix-19158.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Prevent crash when using undo to bring back removed controls

engine/src/control.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ void MCControl::undo(Ustruct *us)
582582
{
583583
MCCard *card = (MCCard *)parent->getcard();
584584
getstack()->appendcontrol(this);
585+
this->MCObject::m_weak_proxy = new MCObjectProxyBase(this);
585586
card->newcontrol(this, False);
586587
Boolean oldrlg = MCrelayergrouped;
587588
MCrelayergrouped = True;

0 commit comments

Comments
 (0)