Skip to content

Commit

Permalink
Fix crash due to assertion during image loading from http (#3750)
Browse files Browse the repository at this point in the history
* Closes #3747
  • Loading branch information
emilk authored Dec 29, 2023
1 parent f4102c0 commit 239ade9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/egui_extras/src/loaders/ehttp_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
});
Expand Down

0 comments on commit 239ade9

Please sign in to comment.