Skip to content

Commit ef47a17

Browse files
authored
fix: populating npc spawn data asserting when npc has no class set (#2065)
1 parent 564b340 commit ef47a17

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/xrServerEntities/object_factory_spawner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void CObjectFactory::init_spawn_data()
6161
cpcstr npc_random = pSettings->read_if_exists<pcstr>(name, "npc_random", "");
6262
_GetItem(npc ? npc : npc_random, 0, temp);
6363

64-
if (!temp.empty())
64+
if (!temp.empty() && pSettings->line_exist(temp.c_str(), "class"))
6565
{
6666
const auto npc_clsid = pSettings->r_clsid(temp.c_str(), "class");
6767
const auto npc_kind = pSettings->read_if_exists<pcstr>(temp.c_str(), "kind", nullptr);

0 commit comments

Comments
 (0)