summaryrefslogtreecommitdiffstats
path: root/ui/views/win/hwnd_message_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/views/win/hwnd_message_handler.cc')
-rw-r--r--ui/views/win/hwnd_message_handler.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 79b7eb5..174be80 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -2063,8 +2063,11 @@ void HWNDMessageHandler::OnSysCommand(UINT notification_code,
// with the mouse/touch/keyboard, we flag as being in a size loop.
if ((notification_code & sc_mask) == SC_SIZE)
in_size_loop_ = true;
+ base::WeakPtr<HWNDMessageHandler> ref(weak_factory_.GetWeakPtr());
DefWindowProc(hwnd(), WM_SYSCOMMAND, notification_code,
MAKELPARAM(point.x(), point.y()));
+ if (!ref.get())
+ return;
in_size_loop_ = false;
}
}