Skip to content

Commit b0e161f

Browse files
committed
surface: Don't check if props!=0 before calling SDL_HasProperty on it.
1 parent d1bedfe commit b0e161f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/video/SDL_surface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2200,7 +2200,7 @@ SDL_Surface *SDL_RotateSurface(SDL_Surface *surface, float angle)
22002200
}
22012201

22022202
if (rotated) {
2203-
if (surface->props && SDL_HasProperty(surface->props, SDL_PROP_SURFACE_ROTATION_FLOAT)) {
2203+
if (SDL_HasProperty(surface->props, SDL_PROP_SURFACE_ROTATION_FLOAT)) {
22042204
const float rotation = (SDL_GetNumberProperty(surface->props, SDL_PROP_SURFACE_ROTATION_FLOAT, 0) - angle);
22052205
SDL_SetFloatProperty(SDL_GetSurfaceProperties(rotated), SDL_PROP_SURFACE_ROTATION_FLOAT, rotation);
22062206
}

0 commit comments

Comments
 (0)