summaryrefslogtreecommitdiffstats
path: root/base/window_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/window_impl.cc')
-rw-r--r--base/window_impl.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/base/window_impl.cc b/base/window_impl.cc
index c3b3ad4..7438bd9 100644
--- a/base/window_impl.cc
+++ b/base/window_impl.cc
@@ -155,7 +155,14 @@ LRESULT WindowImpl::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) {
// Handle the message if it's in our message map; otherwise, let the system
// handle it.
if (!ProcessWindowMessage(hwnd_, message, w_param, l_param, result))
- result = DefWindowProc(hwnd_, message, w_param, l_param);
+ result = DefWindowProc(hwnd_, message, w_param, l_param);
+
+ if (message == WM_NCDESTROY) {
+ // Notify the subclass that this is the last message before the window
+ // is destroyed.
+ OnFinalMessage(hwnd_);
+ hwnd_ = NULL;
+ }
return result;
}