Skip to content

Commit

Permalink
Update dotlottie-rs/src/lottie_renderer/thorvg.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Dragoș Tiselice <[email protected]>
  • Loading branch information
theashraf and dragostis authored Dec 11, 2024
1 parent e7810ef commit e226d0c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions dotlottie-rs/src/lottie_renderer/thorvg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,7 @@ impl Drop for TvgRenderer {
tvg::tvg_canvas_destroy(self.raw_canvas);
}

if *count == 0 {
unreachable!();
}

*count -= 1;
*count = count.checked_sub(1).unwrap();

if *count == 0 {
unsafe { tvg::tvg_engine_term(self.engine_method) };
Expand Down

0 comments on commit e226d0c

Please sign in to comment.