mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 14:43:20 +00:00
kmsdrm: Fix double-free of GBM surface buffer in atomic mode
(cherry picked from commit c2d0b59f29)
This commit is contained in:
parent
61ba96db36
commit
2d0ea900ba
1 changed files with 3 additions and 1 deletions
|
|
@ -1712,7 +1712,9 @@ static void KMSDRM_DestroySurfaces(SDL_VideoDevice *_this, SDL_Window *window)
|
|||
/***************************/
|
||||
|
||||
if (windata->bo) {
|
||||
KMSDRM_gbm_surface_release_buffer(windata->gs, windata->bo);
|
||||
if (windata->bo != windata->next_bo) {
|
||||
KMSDRM_gbm_surface_release_buffer(windata->gs, windata->bo);
|
||||
}
|
||||
windata->bo = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue