Skip to content

Commit

Permalink
image loading null check
Browse files Browse the repository at this point in the history
  • Loading branch information
mothbeanie committed Nov 8, 2022
1 parent a295b8f commit b4748ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion desktop_version/src/GraphicsResources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ void GraphicsResources::init(void)
char buffer[64];
SDL_snprintf(buffer, sizeof(buffer), "graphics/region%i.png", i);
SDL_Surface* temp = LoadImage(buffer);
graphics.customminimaps[i] = temp;
if (temp != NULL)
{
graphics.customminimaps[i] = temp;
}
}
}

Expand Down

0 comments on commit b4748ad

Please sign in to comment.