Explorar o código

Unload Wayland libs if memory allocation fails during init.

Ryan C. Gordon %!s(int64=12) %!d(string=hai) anos
pai
achega
bd01a9c914
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/video/wayland/SDL_waylandvideo.c

+ 1 - 0
src/video/wayland/SDL_waylandvideo.c

@@ -95,6 +95,7 @@ Wayland_CreateDevice(int devindex)
     /* Initialize all variables that we clean on shutdown */
     device = SDL_calloc(1, sizeof(SDL_VideoDevice));
     if (!device) {
+        SDL_WAYLAND_UnloadSymbols();
         SDL_OutOfMemory();
         return NULL;
     }