summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_automation.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r--chrome_frame/chrome_frame_automation.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc
index 32fc24d..6f31bf7 100644
--- a/chrome_frame/chrome_frame_automation.cc
+++ b/chrome_frame/chrome_frame_automation.cc
@@ -613,7 +613,12 @@ bool ChromeFrameAutomationClient::Initialize(
// InitializeComplete is called successfully.
init_state_ = INITIALIZING;
- HRESULT hr = security_manager_.CreateInstance(CLSID_InternetSecurityManager);
+ HRESULT hr = S_OK;
+ // If chrome crashed and is being restarted, the security_manager_ object
+ // might already be valid.
+ if (security_manager_.get() == NULL)
+ hr = security_manager_.CreateInstance(CLSID_InternetSecurityManager);
+
if (FAILED(hr)) {
NOTREACHED() << __FUNCTION__
<< " Failed to create InternetSecurityManager. Error: 0x%x"