mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:12:45 +00:00 
			
		
		
		
	Userland: Return empty if ImageDecoder client receives an invalid frame
This simplifies error checking for all the users of the ImageDecoder client.
This commit is contained in:
		
							parent
							
								
									e6c1429311
								
							
						
					
					
						commit
						eaa6304aab
					
				
					 6 changed files with 11 additions and 15 deletions
				
			
		|  | @ -246,7 +246,7 @@ ErrorOr<void> ViewWidget::try_open_file(String const& path, Core::File& file) | |||
|         frames.ensure_capacity(decoded_image->frames.size()); | ||||
|         for (u32 i = 0; i < decoded_image->frames.size(); i++) { | ||||
|             auto& frame_data = decoded_image->frames[i]; | ||||
|             frames.unchecked_append({ BitmapImage::create(*frame_data.bitmap), int(frame_data.duration) }); | ||||
|             frames.unchecked_append({ BitmapImage::create(frame_data.bitmap), int(frame_data.duration) }); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Ledbetter
						Tim Ledbetter