Skip to content
Permalink
Browse files

Unload Wayland libs if memory allocation fails during init.

  • Loading branch information
icculus committed Feb 3, 2014
1 parent 89fd0fa commit bd01a9c9146dd96d93042520a39a41a594f76e69
Showing with 1 addition and 0 deletions.
  1. +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;
}

0 comments on commit bd01a9c

Please sign in to comment.