Fix crash on loading animated webp alpha

This commit is contained in:
Philip Kristoffersen
2022-09-08 17:05:17 +02:00
parent ddf60a2828
commit 941b647986
7 changed files with 21 additions and 11 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 872 KiB

+6
View File
@@ -94,4 +94,10 @@ mod tests {
let res = load_image_from_path(std::path::Path::new("src/testdata/hollow.webp"));
assert!(res.is_err());
}
#[test]
pub fn test_image_load_animated_webp2() {
let res = load_image_from_path(std::path::Path::new("src/testdata/tunic.webp"));
assert!(res.is_err());
}
}
-3
View File
@@ -577,9 +577,6 @@ impl MyEguiApp {
let thumbnail_key = image.thumbnail_path.to_string_lossy().to_string();
let thumbnail = self.image_selected_state.image_handles.remove(&thumbnail_key);
if let Some((key,thumbnail)) = thumbnail {
dbg!(&full_image_key);
dbg!(&key);
self.image_selected_state
.image_handles
.insert(full_image_key, thumbnail);