Chromium Code Reviews| Index: views/widget/native_widget_win.cc |
| diff --git a/views/widget/native_widget_win.cc b/views/widget/native_widget_win.cc |
| index 599bdd5f23dabd88236d62b6fa8b5d3ca5699971..d058be5b397458e78d329e3b83fe0d7685d01c5e 100644 |
| --- a/views/widget/native_widget_win.cc |
| +++ b/views/widget/native_widget_win.cc |
| @@ -1162,6 +1162,10 @@ LRESULT NativeWidgetWin::OnCreate(CREATESTRUCT* create_struct) { |
| } else { |
| tooltip_manager_.reset(new TooltipManagerWin(GetWidget())); |
| } |
| + if (!tooltip_manager_->Init()) { |
|
Ben Goodger (Google)
2011/06/13 17:26:17
You might note the mystery of why this check exist
|
| + LOG_GETLASTERROR(WARNING) << "tooltip creation failed, disabling tooltips"; |
| + tooltip_manager_.reset(); |
| + } |
| // This message initializes the window so that focus border are shown for |
| // windows. |
| @@ -1478,7 +1482,8 @@ LRESULT NativeWidgetWin::OnMouseRange(UINT message, |
| MouseEvent event(msg); |
| if (!(event.flags() & ui::EF_IS_NON_CLIENT)) |
| - tooltip_manager_->OnMouse(message, w_param, l_param); |
| + if (tooltip_manager_.get()) |
| + tooltip_manager_->OnMouse(message, w_param, l_param); |
| if (event.type() == ui::ET_MOUSE_MOVED && !HasMouseCapture()) { |
| // Windows only fires WM_MOUSELEAVE events if the application begins |