summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/widget/widget_win.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
index c88e218..2b4c649 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));
}