diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 20:29:41 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 20:29:41 +0000 |
commit | 69256505689d6e1aad04c2ac737972c4549d7113 (patch) | |
tree | 330345ebd5e542dc51464f88c6be9a9428f74cc9 /views/controls/menu/native_menu_win.cc | |
parent | 569b02299d0ad14b41625a01c82270184b739e1e (diff) | |
download | chromium_src-69256505689d6e1aad04c2ac737972c4549d7113.zip chromium_src-69256505689d6e1aad04c2ac737972c4549d7113.tar.gz chromium_src-69256505689d6e1aad04c2ac737972c4549d7113.tar.bz2 |
Fix a menu crash.
The menu's host window, the message window that receives notifications from the native menu about selection changes, is destroyed, however if the menu is still active it will continue to send messages to it. SDK docs say properties set with SetProp should be removed with RemoveProp before a window is finally NCDESTROYed. The code wasn't doing this, so it was still theoretically possible for the code in the message window's window procedure to locate "something" on that property.
http://crbug.com/14594
TEST=none
Review URL: http://codereview.chromium.org/147230
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19411 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/menu/native_menu_win.cc')
-rw-r--r-- | views/controls/menu/native_menu_win.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/views/controls/menu/native_menu_win.cc b/views/controls/menu/native_menu_win.cc index d4a39b0..3ef158c 100644 --- a/views/controls/menu/native_menu_win.cc +++ b/views/controls/menu/native_menu_win.cc @@ -58,6 +58,7 @@ class NativeMenuWin::MenuHostWindow { } ~MenuHostWindow() { + RemoveProp(hwnd_, kMenuHostWindowKey); DestroyWindow(hwnd_); } |