SDL_SetWindowProgressState(): Add parameter validation check for state
This commit is contained in:
committed by
Sam Lantinga
parent
3fa1bd81fe
commit
c217663fba
@@ -3926,6 +3926,10 @@ bool SDL_SetWindowProgressState(SDL_Window *window, SDL_ProgressState state)
|
|||||||
CHECK_WINDOW_MAGIC(window, false);
|
CHECK_WINDOW_MAGIC(window, false);
|
||||||
CHECK_WINDOW_NOT_POPUP(window, false);
|
CHECK_WINDOW_NOT_POPUP(window, false);
|
||||||
|
|
||||||
|
if (state < SDL_PROGRESS_STATE_NONE || state > SDL_PROGRESS_STATE_ERROR) {
|
||||||
|
return SDL_InvalidParamError("state");
|
||||||
|
}
|
||||||
|
|
||||||
if (_this->SetWindowProgressState) {
|
if (_this->SetWindowProgressState) {
|
||||||
return _this->SetWindowProgressState(_this, window, state);
|
return _this->SetWindowProgressState(_this, window, state);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user