#3627 std::bad_alloc when loading a model
parent
cc54e206c3
commit
f6a2dbe6ec
|
|
@ -69,9 +69,16 @@ void GLTFSceneManager::load()
|
|||
{
|
||||
return;
|
||||
}
|
||||
if (filenames.size() > 0)
|
||||
try
|
||||
{
|
||||
GLTFSceneManager::instance().load(filenames[0]);
|
||||
if (filenames.size() > 0)
|
||||
{
|
||||
GLTFSceneManager::instance().load(filenames[0]);
|
||||
}
|
||||
}
|
||||
catch (std::bad_alloc&)
|
||||
{
|
||||
LLNotificationsUtil::add("CannotOpenFileTooBig");
|
||||
}
|
||||
},
|
||||
LLFilePicker::FFLOAD_GLTF,
|
||||
|
|
|
|||
|
|
@ -2857,9 +2857,16 @@ void LLMaterialEditor::importMaterial()
|
|||
{
|
||||
return;
|
||||
}
|
||||
if (filenames.size() > 0)
|
||||
try
|
||||
{
|
||||
LLMaterialEditor::loadMaterialFromFile(filenames[0], -1);
|
||||
if (filenames.size() > 0)
|
||||
{
|
||||
LLMaterialEditor::loadMaterialFromFile(filenames[0], -1);
|
||||
}
|
||||
}
|
||||
catch (std::bad_alloc&)
|
||||
{
|
||||
LLNotificationsUtil::add("CannotOpenFileTooBig");
|
||||
}
|
||||
},
|
||||
LLFilePicker::FFLOAD_MATERIAL,
|
||||
|
|
|
|||
|
|
@ -2408,6 +2408,16 @@ Unable to upload snapshot.
|
|||
File might be too big, try reducing resolution or try again later.
|
||||
<tag>fail</tag>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="CannotOpenFileTooBig"
|
||||
type="alertmodal">
|
||||
Unable to open file.
|
||||
|
||||
Viewer run out of memory while opening file. File might be too big.
|
||||
<tag>fail</tag>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
|
|
|
|||
Loading…
Reference in New Issue