ChildView throws exceptions outside MojoShell

We're missing a null check.

Fixes #2949
This commit is contained in:
Adam Barth
2016-03-28 12:12:28 -07:00
parent b070be2279
commit 39640bd0ef

View File

@@ -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);