diff options
Diffstat (limited to 'indra/llcommon/llsdserialize_xml.cpp')
-rw-r--r-- | indra/llcommon/llsdserialize_xml.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp index c5ab369d0f..de4f3197e6 100644 --- a/indra/llcommon/llsdserialize_xml.cpp +++ b/indra/llcommon/llsdserialize_xml.cpp @@ -378,7 +378,10 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data) status = XML_ParseBuffer(mParser, 0, true); if (status == XML_STATUS_ERROR && !mGracefullStop) { - ((char*) buffer)[count? count - 1 : 0] = '\0'; + if (buffer) + { + ((char*) buffer)[count ? count - 1 : 0] = '\0'; + } llinfos << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << llendl; data = LLSD(); return -1; |