diff options
author | Don Kjer <don@lindenlab.com> | 2007-05-02 21:24:47 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2007-05-02 21:24:47 +0000 |
commit | 1c909afe3998778e4cc045c9ab733e8afbf7c25b (patch) | |
tree | 75c00a32a8e305280cbec253195d1113d628fc3e /indra/llmessage/message.cpp | |
parent | bc59c04653bf1404e8148a8169208b146a123b28 (diff) |
svn merge -r 60342:61148 svn+ssh://svn/svn/linden/branches/maintenance into release
Diffstat (limited to 'indra/llmessage/message.cpp')
-rw-r--r-- | indra/llmessage/message.cpp | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 78d12cbda9..dfc18e0b2e 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -515,6 +515,8 @@ void LLMessageSystem::loadTemplateFile(const char* filename) if(!filename) { llerrs << "No template filename specified" << llendl; + mbError = TRUE; + return; } char token[MAX_MESSAGE_INTERNAL_NAME_SIZE]; /* Flawfinder: ignore */ @@ -635,6 +637,13 @@ void LLMessageSystem::loadTemplateFile(const char* filename) // add data! // we've gotten a complete variable! hooray! // add it! + if (NULL == templatep) + { + llerrs << "Trying to addTemplate a NULL templatep during load." << llendl; + mbError = TRUE; + fclose(messagefilep); + return; + } addTemplate(templatep); //llinfos << "Read template: "templatep->mNametemp_str @@ -652,7 +661,13 @@ void LLMessageSystem::loadTemplateFile(const char* filename) // add data! // we've gotten a complete variable! hooray! // add it to template - + if (NULL == templatep) + { + llerrs << "Trying to addBlock to NULL templatep during load." << llendl; + mbError = TRUE; + fclose(messagefilep); + return; + } templatep->addBlock(blockp); // start working on it! @@ -856,10 +871,24 @@ void LLMessageSystem::loadTemplateFile(const char* filename) if (strcmp(token, "Trusted") == 0) { + if (NULL == templatep) + { + llerrs << "Trying to setTrust for NULL templatep during load." << llendl; + mbError = TRUE; + fclose(messagefilep); + return; + } templatep->setTrust(MT_TRUST); } else if (strcmp(token, "NotTrusted") == 0) { + if (NULL == templatep) + { + llerrs << "Trying to setTrust for NULL templatep during load." << llendl; + mbError = TRUE; + fclose(messagefilep); + return; + } templatep->setTrust(MT_NOTRUST); } else @@ -892,10 +921,24 @@ void LLMessageSystem::loadTemplateFile(const char* filename) if(0 == strcmp(token, "Unencoded")) { + if (NULL == templatep) + { + llerrs << "Trying to setEncoding for NULL templatep during load." << llendl; + mbError = TRUE; + fclose(messagefilep); + return; + } templatep->setEncoding(ME_UNENCODED); } else if(0 == strcmp(token, "Zerocoded")) { + if (NULL == templatep) + { + llerrs << "Trying to setEncoding for NULL templatep during load." << llendl; + mbError = TRUE; + fclose(messagefilep); + return; + } templatep->setEncoding(ME_ZEROCODED); } else |