mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-13 06:48:13 +00:00
[SDL2] pointer boolean (#8523)
This commit is contained in:
@@ -165,7 +165,7 @@ loadFont(void)
|
||||
{
|
||||
SDL_Surface *surface = SDL_LoadBMP("kromasky_16x16.bmp");
|
||||
|
||||
if (surface == NULL) {
|
||||
if (!surface) {
|
||||
printf("Error loading bitmap: %s\n", SDL_GetError());
|
||||
return 0;
|
||||
} else {
|
||||
@@ -183,7 +183,7 @@ loadFont(void)
|
||||
SDL_BlitSurface(surface, NULL, converted, NULL);
|
||||
/* create our texture */
|
||||
texture = SDL_CreateTextureFromSurface(renderer, converted);
|
||||
if (texture == NULL) {
|
||||
if (!texture) {
|
||||
printf("texture creation failed: %s\n", SDL_GetError());
|
||||
} else {
|
||||
/* set blend mode for our texture */
|
||||
|
Reference in New Issue
Block a user