Skip to content

Commit

Permalink
Merge pull request #1333 from Monsterovich/feat-fix-segfault-unredir
Browse files Browse the repository at this point in the history
core: fixed segmentation fault in handle_pending_updates
  • Loading branch information
yshui authored Sep 7, 2024
2 parents 4f14390 + 520ef1a commit c6fc045
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 c6fc045

Please sign in to comment.