diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-07-21 00:47:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-07-21 00:47:44 +0300 |
commit | fffbd86a1014ad169ed2d68ea58cdddf346faa14 (patch) | |
tree | 713c96fcf7421ca87f638d312e752179281cb8fe /src/utils/chatutils.cpp | |
parent | 1941b81a5a278f26a5d7e1f91903ab04c92e2cd1 (diff) | |
download | ManaVerse-fffbd86a1014ad169ed2d68ea58cdddf346faa14.tar.gz ManaVerse-fffbd86a1014ad169ed2d68ea58cdddf346faa14.tar.bz2 ManaVerse-fffbd86a1014ad169ed2d68ea58cdddf346faa14.tar.xz ManaVerse-fffbd86a1014ad169ed2d68ea58cdddf346faa14.zip |
Add missing checks and non null attributes.
Diffstat (limited to 'src/utils/chatutils.cpp')
-rw-r--r-- | src/utils/chatutils.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/utils/chatutils.cpp b/src/utils/chatutils.cpp index c5b7e25ad..17ee9e11a 100644 --- a/src/utils/chatutils.cpp +++ b/src/utils/chatutils.cpp @@ -158,7 +158,9 @@ void replaceVars(std::string &str) StringVect names; std::string newStr; const Party *party = nullptr; - if (localPlayer->isInParty() && (party = localPlayer->getParty())) + if (localPlayer->isInParty() && + (party = localPlayer->getParty()) && + party) { party->getNames(names); FOR_EACH (StringVectCIter, it, names) |