Skip to content

Commit 58ca9b6

Browse files
authored
Cmangos: check that faction is not null when setting reputation (#529)
1 parent 59bea55 commit 58ca9b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

methods/CMangos/PlayerMethods.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,9 @@ namespace LuaPlayer
17041704
#else
17051705
FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction);
17061706
#endif
1707-
player->GetReputationMgr().SetReputation(factionEntry, value);
1707+
if (factionEntry != nullptr)
1708+
player->GetReputationMgr().SetReputation(factionEntry, value);
1709+
17081710
return 0;
17091711
}
17101712

0 commit comments

Comments
 (0)