Skip to content

Commit

Permalink
kmsdrm: On VideoQuit(), only destroy dumb buffer if it exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
vanfanel committed Sep 9, 2020
1 parent 8709f67 commit 351219b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/video/kmsdrm/SDL_kmsdrmvideo.c
Expand Up @@ -1447,9 +1447,11 @@ KMSDRM_VideoQuit(_THIS)
SDL_SetError("Failed to issue atomic commit on DestroyWindow().");
}

/* Destroy the DUMB buffer, now that it's not being
/* Destroy the DUMB buffer if it exists, now that it's not being
used anymore by the PRIMARY PLANE. */
KMSDRM_DestroyDumbBuffer(_this, dispdata->dumb_buffer);
if (dispdata->dumb_buffer) {
KMSDRM_DestroyDumbBuffer(_this, dispdata->dumb_buffer);
}

/***************/
/* BLOCK ENDS. */
Expand Down

0 comments on commit 351219b

Please sign in to comment.