mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-01-29 02:30:08 +01:00
Fix potential crash in OpenInputStreamWrapper::Open (fixes issue #2808)
This commit is contained in:
parent
d02d252690
commit
c90b65a72c
@ -90,10 +90,11 @@ class OpenInputStreamWrapper
|
||||
|
||||
void Open(const RequestId& request_id,
|
||||
const network::ResourceRequest& request) {
|
||||
if (!delegate_->OpenInputStream(
|
||||
request_id, request,
|
||||
base::BindOnce(&OpenInputStreamWrapper::OnCallback,
|
||||
base::WrapRefCounted(this)))) {
|
||||
// |delegate_| may be null if we were canceled.
|
||||
if (delegate_ && !delegate_->OpenInputStream(
|
||||
request_id, request,
|
||||
base::BindOnce(&OpenInputStreamWrapper::OnCallback,
|
||||
base::WrapRefCounted(this)))) {
|
||||
OnCallback(nullptr);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user