diff --git a/Source/CK2World/CK2Title.cpp b/Source/CK2World/CK2Title.cpp index 10e6b07f2..262a6192a 100644 --- a/Source/CK2World/CK2Title.cpp +++ b/Source/CK2World/CK2Title.cpp @@ -259,6 +259,10 @@ void CK2Title::setDeJureLiege(const map& titles) deJureLiege = titleItr->second; deJureLiege->addDeJureVassal(this); } + else + { + log("Error: Could not find de jure liege %s for %s.\n", deJureLiegeString.c_str(), titleString.c_str()); + } } } diff --git a/Source/CK2World/CK2World.cpp b/Source/CK2World/CK2World.cpp index ebde12c89..87e7398bf 100644 --- a/Source/CK2World/CK2World.cpp +++ b/Source/CK2World/CK2World.cpp @@ -237,7 +237,14 @@ void CK2World::init(Object* obj, const cultureGroupMapping& cultureGroupMap) { if (titleItr->first.substr(0, 1) == "b") { - titleItr->second->setLiege(titleItr->second->getDeJureLiege()); + if (titleItr->second->getDeJureLiege()) + { + titleItr->second->setLiege(titleItr->second->getDeJureLiege()); + } + else + { + log("Error: barony %s is independent and has no de jure liege.\n", titleItr->first.c_str()); + } } else {