Crash fix. Assumes there should only be one FSVOPartGroup, even with multiple LLVOPartGroups.

Tonya Souther 2014-07-22 13:22:38 -05:00
parent 6dcc1fee80
commit c551b02224
1 changed files with 8 additions and 1 deletions

View File

@ -62,6 +62,10 @@ void LLVOPartGroup::initClass()
//static
void LLVOPartGroup::restoreGL()
{
if (fsvopartgroup == NULL)
{
fsvopartgroup = new FSVOPartGroup();
}
//<FS:LO> Fixing up/classifying Nicky D's fsvopartgroup code
fsvopartgroup->setIndexGeneration( fsvopartgroup->getIndexGeneration() + 2);
@ -219,7 +223,10 @@ LLVOPartGroup::LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegi
setNumTEs(1);
setTETexture(0, LLUUID::null);
mbCanSelect = FALSE; // users can't select particle systems
fsvopartgroup = new FSVOPartGroup();
if (fsvopartgroup == NULL)
{
fsvopartgroup = new FSVOPartGroup();
}
}