| Index: ui/views/widget/native_widget_aura.cc
|
| diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
|
| index 7c6a9b57b07ccc5ae5b358ee7b4e7d27fec236f8..98ba00e61802e33cf7eb09c5a835e491d291138d 100644
|
| --- a/ui/views/widget/native_widget_aura.cc
|
| +++ b/ui/views/widget/native_widget_aura.cc
|
| @@ -546,8 +546,11 @@ bool NativeWidgetAura::IsVisible() const {
|
| }
|
|
|
| void NativeWidgetAura::Activate() {
|
| - aura::client::GetActivationClient(window_->GetRootWindow())->ActivateWindow(
|
| - window_);
|
| + // We don't necessarily have a root window yet. This can happen with
|
| + // constrained windows.
|
| + if (window_->GetRootWindow())
|
| + aura::client::GetActivationClient(window_->GetRootWindow())->ActivateWindow(
|
| + window_);
|
| }
|
|
|
| void NativeWidgetAura::Deactivate() {
|
| @@ -1002,7 +1005,7 @@ void NativeWidgetPrivate::GetAllChildWidgets(gfx::NativeView native_view,
|
| // Code expects widget for |native_view| to be added to |children|.
|
| NativeWidgetAura* native_widget = static_cast<NativeWidgetAura*>(
|
| GetNativeWidgetForNativeView(native_view));
|
| - if (native_widget->GetWidget())
|
| + if (native_widget && native_widget->GetWidget())
|
| children->insert(native_widget->GetWidget());
|
| }
|
|
|
|
|