mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
video: Make sure SDL_FillRects()'s fill_function isn't used unitialized.
This commit is contained in:
parent
eb066a716c
commit
02a2ec986f
@ -259,7 +259,7 @@ SDL_FillRects(SDL_Surface * dst, const SDL_Rect * rects, int count,
|
|||||||
SDL_Rect clipped;
|
SDL_Rect clipped;
|
||||||
Uint8 *pixels;
|
Uint8 *pixels;
|
||||||
const SDL_Rect* rect;
|
const SDL_Rect* rect;
|
||||||
void (*fill_function)(Uint8 * pixels, int pitch, Uint32 color, int w, int h);
|
void (*fill_function)(Uint8 * pixels, int pitch, Uint32 color, int w, int h) = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!dst) {
|
if (!dst) {
|
||||||
@ -326,6 +326,9 @@ SDL_FillRects(SDL_Surface * dst, const SDL_Rect * rects, int count,
|
|||||||
fill_function = SDL_FillRect4;
|
fill_function = SDL_FillRect4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
return SDL_SetError("Unsupported pixel format");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user