src/video/win32/SDL_gdirender.c
changeset 1924 69217fdd2c0a
parent 1920 8a162bfdc838
child 1965 a788656ca29a
--- a/src/video/win32/SDL_gdirender.c	Sat Jul 22 19:51:48 2006 +0000
+++ b/src/video/win32/SDL_gdirender.c	Sat Jul 22 21:02:57 2006 +0000
@@ -249,7 +249,6 @@
     if (SDL_ISPIXELFORMAT_FOURCC(texture->format)) {
         data->yuv = SDL_SW_CreateYUVTexture(texture);
         if (!data->yuv) {
-            GDI_DestroyTexture(renderer, texture);
             return -1;
         }
         data->format = display->current_mode.format;
@@ -266,7 +265,6 @@
         bmi_size = sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD);
         bmi = (LPBITMAPINFO) SDL_calloc(1, bmi_size);
         if (!bmi) {
-            GDI_DestroyTexture(renderer, texture);
             SDL_OutOfMemory();
             return -1;
         }
@@ -291,7 +289,6 @@
                                           ncolors * sizeof(PALETTEENTRY));
             if (!palette) {
                 SDL_free(bmi);
-                GDI_DestroyTexture(renderer, texture);
                 SDL_OutOfMemory();
                 return -1;
             }
@@ -327,7 +324,6 @@
         data->pixels = NULL;
     }
     if (!data->hbm) {
-        GDI_DestroyTexture(renderer, texture);
         WIN_SetError("Couldn't create bitmap");
         return -1;
     }