1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 12:50:04 -04:00

Fix crash due to assertion during image loading from http (#3750)

* Closes https://github.com/emilk/egui/issues/3747
This commit is contained in:
Emil Ernerfeldt
2023-12-29 17:20:52 +01:00
committed by GitHub
parent f4102c05e6
commit 239ade9a59

View File

@@ -95,8 +95,7 @@ impl BytesLoader for EhttpLoader {
}
};
log::trace!("finished loading {uri:?}");
let prev = cache.lock().insert(uri, Poll::Ready(result));
assert!(matches!(prev, Some(Poll::Pending)));
cache.lock().insert(uri, Poll::Ready(result));
ctx.request_repaint();
}
});