Commit 550e153365cd56f13e7fad21be459cf81f26d9eb

Manuel Alfayate Corchete 2020-09-08T02:42:32

kmsdrm: No need to test for display driverdata when freeing a plane.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c
index ab3985a..54162b6 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;