Index: sky/sdk/lib/widgets/basic.dart |
diff --git a/sky/sdk/lib/widgets/basic.dart b/sky/sdk/lib/widgets/basic.dart |
index 4ca534acdb93340e4e3114653246eafcb014acbf..038fec516c3f39cb998fb6221e66ed9396ac4d7b 100644 |
--- a/sky/sdk/lib/widgets/basic.dart |
+++ b/sky/sdk/lib/widgets/basic.dart |
@@ -436,7 +436,9 @@ class WidgetToRenderBoxAdapter extends LeafRenderObjectWrapper { |
} |
void remove() { |
- parent.detachChildRoot(this); |
+ RenderObjectWrapper ancestor = findAncestor(RenderObjectWrapper); |
+ assert(ancestor is RenderObjectWrapper); |
+ ancestor.detachChildRoot(this); |
super.remove(); |
} |