Skip to content

Commit

Permalink
core: fixed memory leak with mask_image call which also causes assert…
Browse files Browse the repository at this point in the history
… crash in win_bind_mask
  • Loading branch information
Monsterovich committed Jun 17, 2023
1 parent cee1287 commit 410ca96
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/win.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,9 @@ bool win_bind_shadow(struct backend_base *b, struct managed_win *w, struct color
b->ops->shadow_from_mask == NULL) {
w->shadow_image = b->ops->render_shadow(b, w->widthb, w->heightb, sctx, c);
} else {
win_bind_mask(b, w);
if (!w->mask_image) {
win_bind_mask(b, w);
}
w->shadow_image = b->ops->shadow_from_mask(b, w->mask_image, sctx, c);
}
if (!w->shadow_image) {
Expand Down

0 comments on commit 410ca96

Please sign in to comment.