From 9de01b171dfd4ea0dde1854d43727bc2fcd0ef52 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Fri, 11 Sep 2015 15:11:44 -0700 Subject: [PATCH] ancestor is Flex assert in widgets/basic.dart We didn't mean to flag null ancestors for this debugging check. Fixes #1140 --- packages/flutter/lib/src/widgets/framework.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index fc2691268d6..84e1220f3ef 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -823,7 +823,6 @@ abstract class Component extends Widget { assert(_child == null); } - String _debugPreviousComponent; assert(() { _debugIsBuilding = true; _debugComponentBuildTree.add(this); @@ -1137,7 +1136,8 @@ abstract class RenderObjectWrapper extends Widget { Widget ancestor = current.parent; while (ancestor != null && ancestor is Component) ancestor = ancestor.parent; - current.debugValidateAncestor(ancestor); + if (ancestor != null) + current.debugValidateAncestor(ancestor); } return true; });