| Index: chrome/browser/views/tab_contents_container_view.cc
|
| ===================================================================
|
| --- chrome/browser/views/tab_contents_container_view.cc (revision 5533)
|
| +++ chrome/browser/views/tab_contents_container_view.cc (working copy)
|
| @@ -37,15 +37,18 @@
|
|
|
| // Hide the contents before adjusting its parent to avoid a full desktop
|
| // flicker.
|
| - ::ShowWindow(container_hwnd, SW_HIDE);
|
| + if(container_hwnd)
|
| + ::ShowWindow(container_hwnd, SW_HIDE);
|
|
|
| // Reset the parent to NULL to ensure hidden tabs don't receive messages.
|
| - ::SetParent(container_hwnd, NULL);
|
| + if(container_hwnd)
|
| + ::SetParent(container_hwnd, NULL);
|
|
|
| tab_contents_->WasHidden();
|
|
|
| // Unregister the tab contents window from the FocusManager.
|
| - views::FocusManager::UninstallFocusSubclass(container_hwnd);
|
| + if(container_hwnd)
|
| + views::FocusManager::UninstallFocusSubclass(container_hwnd);
|
| HWND hwnd = tab_contents_->GetContentHWND();
|
| if (hwnd) {
|
| // We may not have an HWND anymore, if the renderer crashed and we are
|
|
|