WinRT: Removed dead code and fixed memory leak if allocation for driver failed.
--- 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);