From 550e153365cd56f13e7fad21be459cf81f26d9eb Mon Sep 17 00:00:00 2001 From: Manuel Alfayate Corchete Date: Tue, 8 Sep 2020 02:42:32 +0200 Subject: [PATCH] kmsdrm: No need to test for display driverdata when freeing a plane. --- src/video/kmsdrm/SDL_kmsdrmvideo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c index ab3985a61..54162b6bc 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvideo.c +++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c @@ -576,9 +576,7 @@ cleanup: 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;