Initialized rect with zeros

As per @zcbenz 's remark: The rect should be initialized with zeros to prevent random values being passed to the click event handler when `Shell_NotifyIconGetRect` fails.
This commit is contained in:
Seppe Stas 2015-06-08 19:07:46 +02:00
parent 16c08e7e37
commit cac97cca0d

View file

@ -55,7 +55,7 @@ void NotifyIcon::HandleClickEvent(const gfx::Point& cursor_pos,
icon_id.hWnd = window_;
icon_id.cbSize = sizeof(NOTIFYICONIDENTIFIER);
RECT rect;
RECT rect = { 0 };
Shell_NotifyIconGetRect(&icon_id, &rect);
NotifyClicked(gfx::Rect(rect));