mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-19 17:53:31 +00:00
Fix bug #5918
This commit is contained in:
parent
6beea739e5
commit
8b53032419
@ -846,6 +846,9 @@ const std::vector<std::string>& unit::overlays() const
|
||||
*/
|
||||
void unit::read(const config& cfg)
|
||||
{
|
||||
if(cfg["id"]=="" && cfg["type"]=="") {
|
||||
throw game::load_game_failed("Attempt to de-serialize an empty unit");
|
||||
}
|
||||
cfg_ = cfg;
|
||||
side_ = lexical_cast_default<int>(cfg["side"]);
|
||||
if(side_ <= 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user