Skip to content

Commit

Permalink
kmsdrm: No need to test for display driverdata when freeing a plane.
Browse files Browse the repository at this point in the history
  • Loading branch information
vanfanel committed Sep 8, 2020
1 parent 6e03fab commit 550e153
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/video/kmsdrm/SDL_kmsdrmvideo.c
Expand Up @@ -576,9 +576,7 @@ setup_plane(_THIS, struct plane **plane, uint32_t plane_type)
void
free_plane(struct plane **plane)
{
SDL_DisplayData *dispdata = (SDL_DisplayData *)SDL_GetDisplayDriverData(0);

if (dispdata && (*plane)) {
if (*plane) {
if ((*plane)->plane) {
KMSDRM_drmModeFreePlane((*plane)->plane);
(*plane)->plane = NULL;
Expand Down

0 comments on commit 550e153

Please sign in to comment.