summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ceee/ie/plugin/bho/browser_helper_object.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/ceee/ie/plugin/bho/browser_helper_object.cc b/ceee/ie/plugin/bho/browser_helper_object.cc
index 24fbaf8..507cc19 100644
--- a/ceee/ie/plugin/bho/browser_helper_object.cc
+++ b/ceee/ie/plugin/bho/browser_helper_object.cc
@@ -616,6 +616,12 @@ bool BrowserHelperObject::EnsureTabId() {
return true;
}
+ // We might get here AFTER TearDown if onCreated successfully got deferred
+ // yet we never got a valid tab_id_ before we got torn down, and then
+ // onRemoved is called AFTER TearDown, which releases chrome_frame_host_.
+ if (chrome_frame_host_ == NULL)
+ return false;
+
HRESULT hr = chrome_frame_host_->GetSessionId(&tab_id_);
DCHECK(SUCCEEDED(hr));
if (hr == S_FALSE) {