Unload Wayland libs if memory allocation fails during init.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 03 Feb 2014 11:53:21 -0500
changeset 8160 71639d445b59
parent 8159 427e8fdf6f69
child 8161 6c5d35c8b3dd
Unload Wayland libs if memory allocation fails during init.
src/video/wayland/SDL_waylandvideo.c
--- a/src/video/wayland/SDL_waylandvideo.c	Mon Feb 03 11:52:54 2014 -0500
+++ b/src/video/wayland/SDL_waylandvideo.c	Mon Feb 03 11:53:21 2014 -0500
@@ -95,6 +95,7 @@
     /* Initialize all variables that we clean on shutdown */
     device = SDL_calloc(1, sizeof(SDL_VideoDevice));
     if (!device) {
+        SDL_WAYLAND_UnloadSymbols();
         SDL_OutOfMemory();
         return NULL;
     }