diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2011-11-28 11:33:49 -0700 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2011-11-28 11:33:49 -0700 |
commit | 2851cd519338ef4a1fde15da8d4015ab4380d6cb (patch) | |
tree | e293f42016c3ce1a8e7ddb0f015ba72287381f33 /indra/llprimitive | |
parent | be3c6747a88d8bbb2c6b87c9eb97b14a42b90ae7 (diff) |
a try fix for sh-2651: [crashhunters] Crash after google translate failure
and sh-2658: crash in LLPluginMessage::parse
Diffstat (limited to 'indra/llprimitive')
-rw-r--r-- | indra/llprimitive/llvolumexml.cpp | 19 | ||||
-rw-r--r-- | indra/llprimitive/llvolumexml.h | 6 |
2 files changed, 14 insertions, 11 deletions
diff --git a/indra/llprimitive/llvolumexml.cpp b/indra/llprimitive/llvolumexml.cpp index f4f9d4d713..bf2297a029 100644 --- a/indra/llprimitive/llvolumexml.cpp +++ b/indra/llprimitive/llvolumexml.cpp @@ -34,9 +34,9 @@ //============================================================================ -LLXMLNode *LLVolumeXml::exportProfileParams(const LLProfileParams* params) +LLPointer<LLXMLNode> LLVolumeXml::exportProfileParams(const LLProfileParams* params) { - LLXMLNode *ret = new LLXMLNode("profile", FALSE); + LLPointer<LLXMLNode> ret = new LLXMLNode("profile", FALSE); ret->createChild("curve_type", TRUE)->setByteValue(1, ¶ms->getCurveType()); ret->createChild("interval", FALSE)->setFloatValue(2, ¶ms->getBegin()); @@ -46,9 +46,9 @@ LLXMLNode *LLVolumeXml::exportProfileParams(const LLProfileParams* params) } -LLXMLNode *LLVolumeXml::exportPathParams(const LLPathParams* params) +LLPointer<LLXMLNode> LLVolumeXml::exportPathParams(const LLPathParams* params) { - LLXMLNode *ret = new LLXMLNode("path", FALSE); + LLPointer<LLXMLNode> ret = new LLXMLNode("path", FALSE); ret->createChild("curve_type", TRUE)->setByteValue(1, ¶ms->getCurveType()); ret->createChild("interval", FALSE)->setFloatValue(2, ¶ms->getBegin()); ret->createChild("scale", FALSE)->setFloatValue(2, params->getScale().mV); @@ -63,12 +63,15 @@ LLXMLNode *LLVolumeXml::exportPathParams(const LLPathParams* params) } -LLXMLNode *LLVolumeXml::exportVolumeParams(const LLVolumeParams* params) +LLPointer<LLXMLNode> LLVolumeXml::exportVolumeParams(const LLVolumeParams* params) { - LLXMLNode *ret = new LLXMLNode("shape", FALSE); + LLPointer<LLXMLNode> ret = new LLXMLNode("shape", FALSE); - exportPathParams(¶ms->getPathParams())->setParent(ret); - exportProfileParams(¶ms->getProfileParams())->setParent(ret); + LLPointer<LLXMLNode> node ; + node = exportPathParams(¶ms->getPathParams()) ; + node->setParent(ret); + node = exportProfileParams(¶ms->getProfileParams()) ; + node->setParent(ret); return ret; } diff --git a/indra/llprimitive/llvolumexml.h b/indra/llprimitive/llvolumexml.h index 5e79205d9a..9d4d989475 100644 --- a/indra/llprimitive/llvolumexml.h +++ b/indra/llprimitive/llvolumexml.h @@ -34,11 +34,11 @@ class LLVolumeXml { public: - static LLXMLNode* exportProfileParams(const LLProfileParams* params); + static LLPointer<LLXMLNode> exportProfileParams(const LLProfileParams* params); - static LLXMLNode* exportPathParams(const LLPathParams* params); + static LLPointer<LLXMLNode> exportPathParams(const LLPathParams* params); - static LLXMLNode* exportVolumeParams(const LLVolumeParams* params); + static LLPointer<LLXMLNode> exportVolumeParams(const LLVolumeParams* params); }; #endif // LL_LLVOLUMEXML_H |