Browse Source

Unload Wayland libs if memory allocation fails during init.

Ryan C. Gordon 11 years ago
parent
commit
bd01a9c914
1 changed files with 1 additions and 0 deletions
  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 */
     /* Initialize all variables that we clean on shutdown */
     device = SDL_calloc(1, sizeof(SDL_VideoDevice));
     device = SDL_calloc(1, sizeof(SDL_VideoDevice));
     if (!device) {
     if (!device) {
+        SDL_WAYLAND_UnloadSymbols();
         SDL_OutOfMemory();
         SDL_OutOfMemory();
         return NULL;
         return NULL;
     }
     }