src/video/winrt/SDL_winrtvideo.cpp
changeset 10112 f3c18811079d
parent 9998 f67cf37e9cd4
child 10163 0f89301aae00
--- a/src/video/winrt/SDL_winrtvideo.cpp	Thu Mar 10 21:00:27 2016 +0100
+++ b/src/video/winrt/SDL_winrtvideo.cpp	Thu Mar 10 21:00:44 2016 +0100
@@ -118,15 +118,13 @@
     device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
     if (!device) {
         SDL_OutOfMemory();
-        if (device) {
-            SDL_free(device);
-        }
         return (0);
     }
 
     data = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData));
     if (!data) {
         SDL_OutOfMemory();
+        SDL_free(device);
         return (0);
     }
     SDL_zerop(data);