mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-01 05:41:01 +00:00 
			
		
		
		
	LibWeb: Null check response body in load_fallback_favicon_if_needed()
This fixes a null dereference seen sometimes when fetching a favicon doesn't work out as expected.
This commit is contained in:
		
							parent
							
								
									3cf5ad002a
								
							
						
					
					
						commit
						f0288e7f94
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-16 23:52:10 +09:00 
				
			
			Author: https://github.com/awesomekling
Commit: f0288e7f94
			
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -504,7 +504,8 @@ WebIDL::ExceptionOr<void> HTMLLinkElement::load_fallback_favicon_if_needed(JS::N | |||
|         }; | ||||
| 
 | ||||
|         // 3. Use response's unsafe response as an icon as if it had been declared using the icon keyword.
 | ||||
|         response->unsafe_response()->body()->fully_read(realm, move(process_body), move(process_body_error), global).release_value_but_fixme_should_propagate_errors(); | ||||
|         if (auto body = response->unsafe_response()->body()) | ||||
|             body->fully_read(realm, move(process_body), move(process_body_error), global).release_value_but_fixme_should_propagate_errors(); | ||||
|     }; | ||||
| 
 | ||||
|     TRY(Fetch::Fetching::fetch(realm, request, Fetch::Infrastructure::FetchAlgorithms::create(vm, move(fetch_algorithms_input)))); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling