mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 16:33:13 +00:00
LibWeb/Fetch: Actually check if the response is null in recursive fetch
The condition for checking if there was already a response in recursive fetch was accidentally flipped, always causing a null deref. This made redirects crash for example.
This commit is contained in:
parent
0524bc1d13
commit
b91b67f4f3
Notes:
sideshowbarker
2024-07-19 01:59:31 +09:00
Author: https://github.com/Lubrsi
Commit: b91b67f4f3
Pull-request: https://github.com/SerenityOS/serenity/pull/17751
Reviewed-by: https://github.com/linusg
1 changed files with 1 additions and 1 deletions
|
@ -363,7 +363,7 @@ WebIDL::ExceptionOr<Optional<JS::NonnullGCPtr<PendingResponse>>> main_fetch(JS::
|
|||
if (recursive == Recursive::Yes) {
|
||||
// 11. If response is null, then set response to the result of running the steps corresponding to the first
|
||||
// matching statement:
|
||||
auto pending_response = response
|
||||
auto pending_response = !response
|
||||
? TRY(get_response())
|
||||
: PendingResponse::create(vm, request, *response);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue