Skip to content

Commit

Permalink
core: fixed segmentation fault in handle_pending_updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Monsterovich committed Sep 5, 2024
1 parent bc455e8 commit c2d03ec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/wm/win.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,13 @@ static inline void win_release_mask(backend_t *base, struct win *w) {
}
}

static inline void win_release_saved_win_image(backend_t *base, struct win *w) {
if (w->saved_win_image) {
base->ops.release_image(base, w->saved_win_image);
w->saved_win_image = NULL;
}
}

void win_release_images(struct backend_base *backend, struct win *w) {
// We don't want to decide what we should do if the image we want to
// release is stale (do we clear the stale flags or not?) But if we are
Expand All @@ -244,6 +251,7 @@ void win_release_images(struct backend_base *backend, struct win *w) {
win_release_pixmap(backend, w);
win_release_shadow(backend, w);
win_release_mask(backend, w);
win_release_saved_win_image(backend, w);
}

/// Returns true if the `prop` property is stale, as well as clears the stale
Expand Down

0 comments on commit c2d03ec

Please sign in to comment.