Index: chrome_frame/chrome_frame_automation.cc |
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc |
index b4d302300e173ac3eac986f366b014c1a89ed6b6..974840c5f0da3851ed31e512019f89585f23c721 100644 |
--- a/chrome_frame/chrome_frame_automation.cc |
+++ b/chrome_frame/chrome_frame_automation.cc |
@@ -519,7 +519,12 @@ bool ProxyFactory::ReleaseAutomationServer(void* server_id, |
Vector::ContainerType::iterator it = std::find(proxies_.container().begin(), |
proxies_.container().end(), |
entry); |
- proxies_.container().erase(it); |
+ DLOG_IF(ERROR, it == proxies_.container().end()) |
+ << "Proxy wasn't found. Proxy map is likely empty (size=" |
+ << proxies_.container().size() << ")."; |
+ if (it != proxies_.container().end()) |
+ proxies_.container().erase(it); |
+ |
lock_.Release(); |
} |