mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-29 14:38:29 +00:00
Fixed crash when the graphics driver is upgraded while the renderer is running
This commit is contained in:
@@ -2394,6 +2394,10 @@ static int D3D11_SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *c
|
|||||||
ID3D11SamplerState *textureSampler;
|
ID3D11SamplerState *textureSampler;
|
||||||
PixelShaderConstants constants;
|
PixelShaderConstants constants;
|
||||||
|
|
||||||
|
if (!textureData) {
|
||||||
|
return SDL_SetError("Texture is not currently available");
|
||||||
|
}
|
||||||
|
|
||||||
D3D11_SetupShaderConstants(renderer, cmd, texture, &constants);
|
D3D11_SetupShaderConstants(renderer, cmd, texture, &constants);
|
||||||
|
|
||||||
switch (textureData->scaleMode) {
|
switch (textureData->scaleMode) {
|
||||||
|
Reference in New Issue
Block a user