summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome_frame/urlmon_url_request.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc
index 08f44ff..26713a8 100644
--- a/chrome_frame/urlmon_url_request.cc
+++ b/chrome_frame/urlmon_url_request.cc
@@ -221,7 +221,9 @@ size_t UrlmonUrlRequest::SendDataToDelegate(size_t bytes_to_read) {
if (bytes_copied) {
++calling_delegate_;
DCHECK_NE(id(), -1);
- delegate_->OnReadComplete(id(), read_data);
+ // The delegate can go away in the middle of ReadStream
+ if (delegate_)
+ delegate_->OnReadComplete(id(), read_data);
--calling_delegate_;
}
} else {