Panic when rendering to a temporary surface that is not an image surface
Something in the recent refactoring in drawing_ctx.rs broke the case where the temporary surface is not an image surface (e.g. there is a mask, or opacity, but no filters):
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Surface(0x556f80123c40)', /var/home/deathwish/src/Projects/app-icon-preview/_build/target/cargo-home/git/checkouts/librsvg-8b324c7bebe403d1/4ceefaf/src/drawing_ctx.rs:741:88
This is due to the unwrap
here:
let surface_to_filter = SharedImageSurface::copy_from_surface(
&cairo::ImageSurface::try_from(temporary_draw_ctx.cr.target()).unwrap(),
)?;
Edited by Federico Mena Quintero