Do not attempt to draw NdsFileIcon when the vram address is not yet set

This commit is contained in:
Gericom
2026-03-15 10:22:33 +01:00
parent a4ecea6802
commit 601fd6371e

View File

@@ -97,7 +97,8 @@ void NdsFileIcon::Update()
void NdsFileIcon::Draw(GraphicsContext& graphicsContext, const Rgb<8, 8, 8>& backgroundColor) void NdsFileIcon::Draw(GraphicsContext& graphicsContext, const Rgb<8, 8, 8>& backgroundColor)
{ {
if (!graphicsContext.IsVisible(Rectangle(_position, 32, 32))) if (!graphicsContext.IsVisible(Rectangle(_position, 32, 32)) ||
_vramAddress == nullptr)
{ {
return; return;
} }