fix checks

This commit is contained in:
Mylloon 2023-05-04 10:36:15 +02:00
parent dadc103aed
commit 1f664c1404
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -21,13 +21,13 @@ int writeText(GLuint *_textTexId, TTF_Font *font, char *text, SDL_Color color) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
SDL_Surface *d, *s;
if ((d = TTF_RenderUTF8_Blended_Wrapped(font, text, color, 0)) == NULL) {
if (!(d = TTF_RenderUTF8_Blended_Wrapped(font, text, color, 0))) {
freeFont(font);
fprintf(stderr, "Erreur TTF : TTF_RenderUTF8_Blended_Wrapped\n");
return 1;
}
if ((s = SDL_CreateRGBSurface(0, d->w, d->h, 32, R_MASK, G_MASK, B_MASK,
if (!(s = SDL_CreateRGBSurface(0, d->w, d->h, 32, R_MASK, G_MASK, B_MASK,
A_MASK))) {
freeFont(font);
fprintf(stderr, "Erreur SDL : %s\n", SDL_GetError());