From ab6fd322d11c2e1126ce85e729d803fc0aec2da1 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 5 Jun 2019 16:30:36 +0200 Subject: [PATCH] Fix crash when loading a file:// URL (fixes issue #2670) --- libcef/browser/net_service/proxy_url_loader_factory.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libcef/browser/net_service/proxy_url_loader_factory.cc b/libcef/browser/net_service/proxy_url_loader_factory.cc index 9ef1a9762..a11c64323 100644 --- a/libcef/browser/net_service/proxy_url_loader_factory.cc +++ b/libcef/browser/net_service/proxy_url_loader_factory.cc @@ -829,7 +829,8 @@ void InterceptedRequest::ContinueToResponseStarted(int error_code) { std::string location; const bool is_redirect = redirect_url.is_valid() || - current_response_.headers->IsRedirect(&location); + (current_response_.headers && + current_response_.headers->IsRedirect(&location)); if (stream_loader_ && is_redirect) { // Redirecting from OnReceiveResponse generally isn't supported by the // NetworkService, so we can only support it when using a custom loader.