From 39640bd0efcab3aae38ab4e6ad5b37323f67989a Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Mon, 28 Mar 2016 12:12:28 -0700 Subject: [PATCH] ChildView throws exceptions outside MojoShell We're missing a null check. Fixes #2949 --- packages/flutter/lib/src/rendering/child_view.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/flutter/lib/src/rendering/child_view.dart b/packages/flutter/lib/src/rendering/child_view.dart index 5bf5eab1fc..0212737400 100644 --- a/packages/flutter/lib/src/rendering/child_view.dart +++ b/packages/flutter/lib/src/rendering/child_view.dart @@ -36,6 +36,8 @@ final mojom.ViewProxy _viewProxy = _initViewProxy(); final mojom.View _view = _viewProxy?.ptr; mojom.ViewContainer _initViewContainer() { + if (_view == null) + return null; mojom.ViewContainerProxy viewContainerProxy = new mojom.ViewContainerProxy.unbound(); _view.getContainer(viewContainerProxy); viewContainerProxy.ptr.setListener(new mojom.ViewContainerListenerStub.unbound()..impl = _ViewContainerListenerImpl.instance);