FIRE-15204: Viewer crashes when clicking "upload model" quickly twice then closing both filepickers

Thu, 18 Dec 2014 16:18:55 +0100

author
Ansariel
date
Thu, 18 Dec 2014 16:18:55 +0100
changeset 43089
9bc36a62fac4
parent 43088
3adb3ead1196
child 43090
2356275b583d

FIRE-15204: Viewer crashes when clicking "upload model" quickly twice then closing both filepickers

indra/newview/llfloatermodelpreview.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llfloatermodelpreview.cpp	Thu Dec 18 15:28:57 2014 +0100
     1.2 +++ b/indra/newview/llfloatermodelpreview.cpp	Thu Dec 18 16:18:55 2014 +0100
     1.3 @@ -659,6 +659,13 @@
     1.4  
     1.5  void LLFloaterModelPreview::loadModel(S32 lod)
     1.6  {
     1.7 +	// <FS:Ansariel> FIRE-15204: Viewer crashes when clicking "upload model" quickly twice then closing both filepickers
     1.8 +	if (mModelPreview->mLoading)
     1.9 +	{
    1.10 +		return;
    1.11 +	}
    1.12 +	// </FS:Ansariel>
    1.13 +
    1.14  	mModelPreview->mLoading = true;
    1.15  
    1.16  	(new LLMeshFilePicker(mModelPreview, lod))->getFile();
    1.17 @@ -666,6 +673,13 @@
    1.18  
    1.19  void LLFloaterModelPreview::loadModel(S32 lod, const std::string& file_name, bool force_disable_slm)
    1.20  {
    1.21 +	// <FS:Ansariel> FIRE-15204: Viewer crashes when clicking "upload model" quickly twice then closing both filepickers
    1.22 +	if (mModelPreview->mLoading)
    1.23 +	{
    1.24 +		return;
    1.25 +	}
    1.26 +	// </FS:Ansariel>
    1.27 +
    1.28  	mModelPreview->mLoading = true;
    1.29  
    1.30  	mModelPreview->loadModel(file_name, lod, force_disable_slm);

mercurial