diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c index ac75ec371..e7856ce44 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvideo.c +++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c @@ -325,6 +325,7 @@ KMSDRM_VideoInit(_THIS) } KMSDRM_drmModeFreeConnector(connector); + connector = NULL; } if (i == resources->count_connectors) { @@ -345,6 +346,7 @@ KMSDRM_VideoInit(_THIS) } KMSDRM_drmModeFreeEncoder(encoder); + encoder = NULL; } if (i == resources->count_encoders) {