diff --git a/src/ChatHelper.cpp b/src/ChatHelper.cpp index 8f464d5d..7bd8e590 100644 --- a/src/ChatHelper.cpp +++ b/src/ChatHelper.cpp @@ -304,9 +304,13 @@ ItemIds ChatHelper::parseItems(std::string const text) std::string const ChatHelper::FormatQuest(Quest const* quest) { + if (!quest) + { + return "Invalid quest"; + } + std::ostringstream out; - out << "|cFFFFFF00|Hquest:" << quest->GetQuestId() << ':' << quest->GetQuestLevel() << "|h[" << quest->GetTitle() - << "]|h|r"; + out << "|cFFFFFF00|Hquest:" << quest->GetQuestId() << ':' << quest->GetQuestLevel() << "|h[" << quest->GetTitle() << "]|h|r"; return out.str(); }