[SDL2] pointer boolean (#8523)

This commit is contained in:
Sylvain Becker 2023-11-10 15:30:56 +01:00 committed by GitHub
parent 4a3a9f3ad8
commit a14b948b6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
394 changed files with 2564 additions and 2559 deletions

View file

@ -65,13 +65,13 @@ void InitCreateRenderer(void *arg)
*/
void CleanupDestroyRenderer(void *arg)
{
if (renderer != NULL) {
if (renderer) {
SDL_DestroyRenderer(renderer);
renderer = NULL;
SDLTest_AssertPass("SDL_DestroyRenderer()");
}
if (window != NULL) {
if (window) {
SDL_DestroyWindow(window);
window = NULL;
SDLTest_AssertPass("SDL_DestroyWindow");
@ -938,12 +938,12 @@ _loadTestFace(void)
SDL_Texture *tface;
face = SDLTest_ImageFace();
if (face == NULL) {
if (!face) {
return NULL;
}
tface = SDL_CreateTextureFromSurface(renderer, face);
if (tface == NULL) {
if (!tface) {
SDLTest_LogError("SDL_CreateTextureFromSurface() failed with error: %s", SDL_GetError());
}
@ -970,7 +970,7 @@ _hasTexColor(void)
/* Get test face. */
tface = _loadTestFace();
if (tface == NULL) {
if (!tface) {
return 0;
}
@ -1014,7 +1014,7 @@ _hasTexAlpha(void)
/* Get test face. */
tface = _loadTestFace();
if (tface == NULL) {
if (!tface) {
return 0;
}