mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	Merge pull request #3445 from crobibero/invalid-image
catch skia errors when getting image dimensions
This commit is contained in:
		
						commit
						fc722a612e
					
				@ -1894,9 +1894,19 @@ namespace Emby.Server.Implementations.Library
 | 
				
			|||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
                    ImageDimensions size = _imageProcessor.GetImageDimensions(item, image);
 | 
					                    ImageDimensions size = _imageProcessor.GetImageDimensions(item, image);
 | 
				
			||||||
                    image.Width = size.Width;
 | 
					                    image.Width = size.Width;
 | 
				
			||||||
                    image.Height = size.Height;
 | 
					                    image.Height = size.Height;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch (Exception ex)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    _logger.LogError(ex, "Cannnot get image dimensions for {0}", image.Path);
 | 
				
			||||||
 | 
					                    image.Width = 0;
 | 
				
			||||||
 | 
					                    image.Height = 0;
 | 
				
			||||||
 | 
					                    continue;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                try
 | 
					                try
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user