Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(623)

Unified Diff: mojo/examples/window_manager/window_manager.cc

Issue 580353002: mojo: Fix crash in example WM when closing window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/window_manager/window_manager.cc
diff --git a/mojo/examples/window_manager/window_manager.cc b/mojo/examples/window_manager/window_manager.cc
index d0e6d82a67b4f08a44bd893b4f46725bd79208aa..f2167afde0465947dbf460e12c44e4e978150331 100644
--- a/mojo/examples/window_manager/window_manager.cc
+++ b/mojo/examples/window_manager/window_manager.cc
@@ -299,8 +299,9 @@ class WindowManager
void CloseWindow(Id view_id) {
WindowVector::iterator iter = GetWindowByViewId(view_id);
DCHECK(iter != windows_.end());
+ Window* window = *iter;
windows_.erase(iter);
- (*iter)->view()->Destroy();
+ window->view()->Destroy();
}
void ShowKeyboard(Id view_id, const gfx::Rect& bounds) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698