aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/PrivateContainer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GraphicObjects/PrivateContainer.cs')
-rw-r--r--src/GraphicObjects/PrivateContainer.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/GraphicObjects/PrivateContainer.cs b/src/GraphicObjects/PrivateContainer.cs
index d6637247..f3f6dbf1 100644
--- a/src/GraphicObjects/PrivateContainer.cs
+++ b/src/GraphicObjects/PrivateContainer.cs
@@ -68,9 +68,13 @@ namespace Crow
contentSize = default(Size);
child.LayoutChanged -= OnChildLayoutChanges;
this.RegisterForGraphicUpdate ();
- }
- child = _child as GraphicObject;
+ GraphicObject tmp = child;
+ child = null;
+ tmp.Parent = null;
+ }
+
+ child = _child;
if (child != null) {
child.Parent = this;