diff options
Diffstat (limited to 'chrome_frame/test/win_event_receiver.cc')
-rw-r--r-- | chrome_frame/test/win_event_receiver.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome_frame/test/win_event_receiver.cc b/chrome_frame/test/win_event_receiver.cc index 045a48c..fbc21f2 100644 --- a/chrome_frame/test/win_event_receiver.cc +++ b/chrome_frame/test/win_event_receiver.cc @@ -169,8 +169,8 @@ void WindowWatchdog::RemoveObserver(WindowObserver* observer) { std::string WindowWatchdog::GetWindowCaption(HWND hwnd) { std::string caption; int len = ::GetWindowTextLength(hwnd) + 1; - ::GetWindowTextA(hwnd, WriteInto(&caption, len), len); - + if (len > 1) + ::GetWindowTextA(hwnd, WriteInto(&caption, len), len); return caption; } |