|
@@ -3888,7 +3888,8 @@ bool SDL_RenderTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_F
|
|
|
real_srcrect.w = (float)texture->w;
|
|
|
real_srcrect.h = (float)texture->h;
|
|
|
if (srcrect) {
|
|
|
- if (!SDL_GetRectIntersectionFloat(srcrect, &real_srcrect, &real_srcrect)) {
|
|
|
+ if (!SDL_GetRectIntersectionFloat(srcrect, &real_srcrect, &real_srcrect) ||
|
|
|
+ real_srcrect.w == 0.0f || real_srcrect.h == 0.0f) {
|
|
|
return true;
|
|
|
}
|
|
|
}
|