mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
direct3d: don't dereference bogus pointer if current texture was destroyed.
Fixes Bugzilla #4460.
This commit is contained in:
parent
4392c6ff14
commit
4f59d372f8
@ -1501,8 +1501,13 @@ D3D_RenderPresent(SDL_Renderer * renderer)
|
||||
static void
|
||||
D3D_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
||||
{
|
||||
D3D_RenderData *renderdata = (D3D_RenderData *) renderer->driverdata;
|
||||
D3D_TextureData *data = (D3D_TextureData *) texture->driverdata;
|
||||
|
||||
if (renderdata->drawstate.texture == texture) {
|
||||
renderdata->drawstate.texture = NULL;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user