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

Unified Diff: views/widget/widget_win.cc

Issue 2124009: Fix a crasher with "select file" dialogs. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Merge Created 10 years, 7 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 | « app/win/window_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget_win.cc
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
index c88e2186086e4259558a68387554b1569727a633..2b4c649a3f54ac4f65cab0a1f2bb21ab879de663 100644
--- a/views/widget/widget_win.cc
+++ b/views/widget/widget_win.cc
@@ -65,6 +65,11 @@ WidgetWin::~WidgetWin() {
// static
WidgetWin* WidgetWin::GetWidget(HWND hwnd) {
+ // TODO(jcivelli): http://crbug.com/44499 We need a way to test that hwnd is
+ // associated with a WidgetWin (it might be a pure
+ // WindowImpl).
+ if (!WindowImpl::IsWindowImpl(hwnd))
+ return NULL;
return reinterpret_cast<WidgetWin*>(win_util::GetWindowUserData(hwnd));
}
« no previous file with comments | « app/win/window_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698