Catch oom for graphics importer
Because DXFs and SVGs could be nasty sized
This commit is contained in:
parent
e955f83c51
commit
c4801a4dd4
|
@ -63,5 +63,18 @@ bool GRAPHICS_IMPORTER::Import( double aScale )
|
|||
|
||||
m_plugin->SetImporter( this );
|
||||
|
||||
return m_plugin->Import();
|
||||
bool success = false;
|
||||
|
||||
try
|
||||
{
|
||||
success = m_plugin->Import();
|
||||
}
|
||||
catch( const std::bad_alloc& )
|
||||
{
|
||||
// Memory exhaustion
|
||||
// TODO report back an error message
|
||||
return false;
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue