Commit 23af328bb03dac55ebc3b5208c6a105a3a0dbc18

David Ludwig 2016-06-24T22:17:56

Fixed Bug 3147 - Windows: Crash when resizing Window since hg 1f9d57965528 Thanks for the fix, Gab!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c
index 9d75642..da8c1af 100644
--- a/src/render/direct3d/SDL_render_d3d.c
+++ b/src/render/direct3d/SDL_render_d3d.c
@@ -1004,6 +1004,10 @@ D3D_RecreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
     D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata;
     D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata;
 
+    if (!texturedata) {
+        return 0;
+    }
+
     if (D3D_RecreateTextureRep(data->device, &texturedata->texture, texture->format, texture->w, texture->h) < 0) {
         return -1;
     }