missing tex

This commit is contained in:
2026-03-16 11:31:06 +01:00
parent f6a1e59ebb
commit 681f53bd95

View File

@@ -10,7 +10,12 @@ namespace Game::Renderer {
SDL_Surface* surf = IMG_Load(path.c_str()); SDL_Surface* surf = IMG_Load(path.c_str());
if (!surf) { if (!surf) {
ERROR("Failed to load image at " << path); ERROR("Failed to load image at " << path);
return; // Load Missing Texture
surf = IMG_Load("../resources/missing_texture.png");
if (!surf) {
ERROR("Failed to load missing texture image");
return;
}
} }
mTex = SDL_CreateTextureFromSurface(renderer, surf); mTex = SDL_CreateTextureFromSurface(renderer, surf);