src/video/winrt/SDL_winrtvideo.cpp
changeset 10112 f3c18811079d
parent 9998 f67cf37e9cd4
child 10163 0f89301aae00
equal deleted inserted replaced
10111:c14536d0deff 10112:f3c18811079d
   116 
   116 
   117     /* Initialize all variables that we clean on shutdown */
   117     /* Initialize all variables that we clean on shutdown */
   118     device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
   118     device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
   119     if (!device) {
   119     if (!device) {
   120         SDL_OutOfMemory();
   120         SDL_OutOfMemory();
   121         if (device) {
       
   122             SDL_free(device);
       
   123         }
       
   124         return (0);
   121         return (0);
   125     }
   122     }
   126 
   123 
   127     data = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData));
   124     data = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData));
   128     if (!data) {
   125     if (!data) {
   129         SDL_OutOfMemory();
   126         SDL_OutOfMemory();
       
   127         SDL_free(device);
   130         return (0);
   128         return (0);
   131     }
   129     }
   132     SDL_zerop(data);
   130     SDL_zerop(data);
   133     device->driverdata = data;
   131     device->driverdata = data;
   134 
   132