Skip to content
This repository has been archived by the owner on Mar 29, 2020. It is now read-only.

Commit

Permalink
Fix crashbug when holders of only titular titles are vassals
Browse files Browse the repository at this point in the history
  • Loading branch information
Idhrendur committed May 1, 2013
1 parent 250c877 commit 5b59c47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Data Files/Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -382,4 +382,5 @@ Revision Log Message
375
376 Manpower numbers are less insane
377 Fix crashbug with independent republic families
378 Fix bug with culturalTech option
378 Fix bug with culturalTech option
379 Fix crashbug when holders of only titular titles are vassals
2 changes: 1 addition & 1 deletion Source/CK2World/CK2Character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ int CK2Character::getOpinionOf(const CK2Character* other) const
// Wrong Government Type (counts and above only)
if (this->isDirectVassalOf(other) && this->primaryTitleString.substr(0,2) != "b_")
{
if (this->primaryHolding->getType() != other->primaryHolding->getType())
if ((this->primaryHolding != NULL) && (this->primaryHolding->getType() != other->primaryHolding->getType()))
{
relations += CK2Opinion::getBaseValue("opinion_count_wrong_gov_vs_liege");
}
Expand Down

0 comments on commit 5b59c47

Please sign in to comment.