From 33131bc7a1dfb923439e1593df13aca1e700a6f1 Mon Sep 17 00:00:00 2001 From: Louis Capitanchik Date: Mon, 16 Jan 2023 03:22:54 +0000 Subject: [PATCH] Skip removed tiles in extract instead of unwrap --- src/render/extract.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/render/extract.rs b/src/render/extract.rs index 4175d7b8..58dde17b 100644 --- a/src/render/extract.rs +++ b/src/render/extract.rs @@ -281,7 +281,10 @@ pub fn extract( color: color.0.into(), }; - let data = tilemap_query.get(tilemap_id.0).unwrap(); + let data = match tilemap_query.get(tilemap_id.0) { + Ok(data) => data, + Err(_) => continue, + }; extracted_tilemaps.insert( data.0,