From 9db4230aeedfbeec1aaf1827ab6becb79d1db886 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Tue, 29 Aug 2023 15:34:07 +0100 Subject: [PATCH] Better error if we run out of VRam --- agb/src/display/tiled/vram_manager.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agb/src/display/tiled/vram_manager.rs b/agb/src/display/tiled/vram_manager.rs index c9220f73..bb5bb200 100644 --- a/agb/src/display/tiled/vram_manager.rs +++ b/agb/src/display/tiled/vram_manager.rs @@ -302,7 +302,7 @@ impl VRamManager { let new_reference: NonNull = unsafe { TILE_ALLOCATOR.alloc(layout_of(tile_set.format)) } - .unwrap() + .expect("Ran out of video RAM for tiles") .cast(); let tile_reference = TileReference(new_reference); reference.or_insert(tile_reference);