summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/views/window.cc1
-rw-r--r--chrome/views/window_delegate.cc1
2 files changed, 1 insertions, 1 deletions
diff --git a/chrome/views/window.cc b/chrome/views/window.cc
index db6174c..75bd988 100644
--- a/chrome/views/window.cc
+++ b/chrome/views/window.cc
@@ -336,6 +336,7 @@ void Window::OnCommand(UINT notification_code, int command_id, HWND window) {
void Window::OnDestroy() {
if (window_delegate_) {
window_delegate_->WindowClosing();
+ window_delegate_->window_.release();
window_delegate_ = NULL;
}
RestoreEnabledIfNecessary();
diff --git a/chrome/views/window_delegate.cc b/chrome/views/window_delegate.cc
index f6021e0..d93a7bd 100644
--- a/chrome/views/window_delegate.cc
+++ b/chrome/views/window_delegate.cc
@@ -14,7 +14,6 @@ WindowDelegate::WindowDelegate() {
}
WindowDelegate::~WindowDelegate() {
- window_.release();
}
// Returns the icon to be displayed in the window.