Chromium Code Reviews| Index: mojo/services/window_manager/window_manager_app.cc |
| diff --git a/mojo/services/window_manager/window_manager_app.cc b/mojo/services/window_manager/window_manager_app.cc |
| index 42c9e03fa14543ad92db5a3c34699dcda86c88d2..cddc33fb9e628d3147a3d141ef53030ed0229391 100644 |
| --- a/mojo/services/window_manager/window_manager_app.cc |
| +++ b/mojo/services/window_manager/window_manager_app.cc |
| @@ -171,7 +171,8 @@ void WindowManagerApp::OnRootAdded(ViewManager* view_manager, |
| focus_client_->AddObserver(this); |
| activation_client_->AddObserver(this); |
| - wrapped_delegate_->OnRootAdded(view_manager, root); |
| + if (wrapped_delegate_) |
|
jamesr
2014/07/25 00:20:29
after https://codereview.chromium.org/400113005, t
|
| + wrapped_delegate_->OnRootAdded(view_manager, root); |
| for (Connections::const_iterator it = connections_.begin(); |
| it != connections_.end(); ++it) { |
| @@ -182,7 +183,8 @@ void WindowManagerApp::OnRootAdded(ViewManager* view_manager, |
| void WindowManagerApp::OnViewManagerDisconnected( |
| ViewManager* view_manager) { |
| DCHECK_EQ(view_manager_, view_manager); |
| - wrapped_delegate_->OnViewManagerDisconnected(view_manager); |
| + if (wrapped_delegate_) |
| + wrapped_delegate_->OnViewManagerDisconnected(view_manager); |
| root_->RemoveObserver(this); |
| root_ = NULL; |
| view_manager_ = NULL; |