Fixed Bug 3147 - Windows: Crash when resizing Window since hg 333216331863
authorDavid Ludwig <dludwig@pobox.com>
Fri, 24 Jun 2016 22:17:56 -0400
changeset 1018317e0ded12e6f
parent 10182 4980c48b8dbe
child 10184 cb09212d4480
Fixed Bug 3147 - Windows: Crash when resizing Window since hg 333216331863

Thanks for the fix, Gab!
src/render/direct3d/SDL_render_d3d.c
     1.1 --- a/src/render/direct3d/SDL_render_d3d.c	Fri Jun 24 19:06:06 2016 +0200
     1.2 +++ b/src/render/direct3d/SDL_render_d3d.c	Fri Jun 24 22:17:56 2016 -0400
     1.3 @@ -1004,6 +1004,10 @@
     1.4      D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata;
     1.5      D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata;
     1.6  
     1.7 +    if (!texturedata) {
     1.8 +        return 0;
     1.9 +    }
    1.10 +
    1.11      if (D3D_RecreateTextureRep(data->device, &texturedata->texture, texture->format, texture->w, texture->h) < 0) {
    1.12          return -1;
    1.13      }