diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/widget/native_widget_aura.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/views/widget/native_widget_aura.cc b/views/widget/native_widget_aura.cc index 243d9c5..fe0d3d1 100644 --- a/views/widget/native_widget_aura.cc +++ b/views/widget/native_widget_aura.cc @@ -349,7 +349,13 @@ void NativeWidgetAura::SetShape(gfx::NativeRegion region) { } void NativeWidgetAura::Close() { - Hide(); + // |window_| may already be deleted by parent window. This can happen + // when this widget is child widget or has transient parent + // and ownership is WIDGET_OWNS_NATIVE_WIDGET. + DCHECK(window_ || + ownership_ == Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET); + if (window_) + Hide(); window_->SetIntProperty(aura::kModalKey, 0); |