Skip to content

Commit

Permalink
Do not resize TileMap on missing width/height if no Sector is active
Browse files Browse the repository at this point in the history
  • Loading branch information
Vankata453 committed Dec 5, 2024
1 parent 8687240 commit c2b560b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/object/tilemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ TileMap::parse_tiles(const ReaderMapping& reader)
reader.get("height", m_height);
if (m_width < 0 || m_height < 0)
{
//throw std::runtime_error("Invalid/No width/height specified in tilemap.");
if (!Sector::current())
throw std::runtime_error("Invalid/No width/height specified in tilemap.");

m_width = 0;
m_height = 0;
m_tiles.clear();
Expand Down

0 comments on commit c2b560b

Please sign in to comment.