summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--views/widget/widget.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/views/widget/widget.cc b/views/widget/widget.cc
index eeff786..f81ee88 100644
--- a/views/widget/widget.cc
+++ b/views/widget/widget.cc
@@ -433,9 +433,11 @@ void Widget::ResetLastMouseMoveFlag() {
}
void Widget::UpdateWindowTitle() {
- // If the non-client view is rendering its own title, it'll need to relayout
- // now.
- non_client_view_->Layout();
+ if (non_client_view_) {
+ // If the non-client view is rendering its own title, it'll need to relayout
+ // now.
+ non_client_view_->Layout();
+ }
// Update the native frame's text. We do this regardless of whether or not
// the native frame is being used, since this also updates the taskbar, etc.
@@ -582,7 +584,7 @@ void Widget::OnNativeWidgetDestroyed() {
}
gfx::Size Widget::GetMinimumSize() {
- return non_client_view_->GetMinimumSize();
+ return non_client_view_ ? non_client_view_->GetMinimumSize() : gfx::Size();
}
void Widget::OnNativeWidgetSizeChanged(const gfx::Size& new_size) {