diff options
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index 94d30b8..7e5aa6c 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -697,7 +697,7 @@ void ChromeFrameAutomationClient::Uninitialize() { url_fetcher_ = NULL; } - if (tab_.get()) { + if (tab_) { tab_->RemoveObserver(this); if (automation_server_) automation_server_->ReleaseTabProxy(tab_->handle()); @@ -929,7 +929,7 @@ void ChromeFrameAutomationClient::OnChromeFrameHostMoved() { scoped_refptr<TabProxy> tab(tab_); // There also is a possibility that tab_ has not been set yet, // so we still need to test for NULL. - if (tab.get() != NULL) + if (tab) tab->OnHostMoved(); } @@ -1314,8 +1314,8 @@ void ChromeFrameAutomationClient::ReleaseAutomationServer() { void ChromeFrameAutomationClient::SendContextMenuCommandToChromeFrame( int selected_command) { - DCHECK(tab_ != NULL); - tab_->SendContextMenuCommand(selected_command); + if (tab_) + tab_->SendContextMenuCommand(selected_command); } std::wstring ChromeFrameAutomationClient::GetVersion() const { @@ -1341,7 +1341,8 @@ void ChromeFrameAutomationClient::Print(HDC print_dc, } void ChromeFrameAutomationClient::PrintTab() { - tab_->PrintAsync(); + if (tab_) + tab_->PrintAsync(); } bool ChromeFrameAutomationClient::Reinitialize( |