Fix crash when loading a file:// URL (fixes issue #2670)

This commit is contained in:
Marshall Greenblatt 2019-06-05 16:30:36 +02:00
parent 7e742f6e1f
commit ab6fd322d1
1 changed files with 2 additions and 1 deletions

View File

@ -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.