mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-26 19:39:31 +00:00
fixed crash when loading an empty map
This commit is contained in:
parent
feeffbba6b
commit
8061d704d5
@ -287,7 +287,7 @@ std::string gamemap::write() const
|
||||
}
|
||||
|
||||
int gamemap::x() const { return tiles_.size(); }
|
||||
int gamemap::y() const { return tiles_[0].size(); }
|
||||
int gamemap::y() const { return tiles_.empty() ? 0 : tiles_.front().size(); }
|
||||
|
||||
const std::vector<gamemap::TERRAIN>& gamemap::operator[](int index) const
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user