use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError
This commit is contained in:
1 parent
4a17612bff
commit
ebdd536676
36 files changed
+109
-123
No files matched your search
@@ -930,9 +930,7 @@ SDL_AddAudioCVTFilter(SDL_AudioCVT *cvt, const SDL_AudioFilter filter)
|
||||
if (cvt->filter_index >= SDL_AUDIOCVT_MAX_FILTERS) {
|
||||
return SDL_SetError("Too many filters needed for conversion, exceeded maximum of %d", SDL_AUDIOCVT_MAX_FILTERS);
|
||||
}
|
||||
if (filter == NULL) {
|
||||
return SDL_SetError("Audio filter pointer is NULL");
|
||||
}
|
||||
SDL_assert(filter != NULL);
|
||||
cvt->filters[cvt->filter_index++] = filter;
|
||||
cvt->filters[cvt->filter_index] = NULL; /* Moving terminator */
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user