diff --git a/src/lua/functions/creatures/monster/loot_functions.cpp b/src/lua/functions/creatures/monster/loot_functions.cpp index 81e42535f92..b23508033bc 100644 --- a/src/lua/functions/creatures/monster/loot_functions.cpp +++ b/src/lua/functions/creatures/monster/loot_functions.cpp @@ -259,7 +259,13 @@ int LootFunctions::luaLootAddChildLoot(lua_State* L) { // loot:addChildLoot(loot) const auto loot = getUserdataShared(L, 1); if (loot) { - loot->lootBlock.childLoot.push_back(getUserdata(L, 2)->lootBlock); + const auto childLoot = getUserdata(L, 2); + if (childLoot) { + loot->lootBlock.childLoot.push_back(childLoot->lootBlock); + pushBoolean(L, true); + } else { + pushBoolean(L, false); + } } else { lua_pushnil(L); }