Backport 93466fa1: Fix crash when adding 3D Models via Python
This commit is contained in:
parent
591a07d2d9
commit
540fb91d34
|
@ -783,8 +783,6 @@ void MODULE::Add3DModel( MODULE_3D_SETTINGS* a3DModel )
|
|||
|
||||
if( !a3DModel->m_Filename.empty() )
|
||||
m_3D_Drawings.push_back( *a3DModel );
|
||||
|
||||
delete a3DModel;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2182,7 +2182,11 @@ MODULE* PCB_PARSER::parseMODULE_unchecked( wxArrayString* aInitialComments )
|
|||
break;
|
||||
|
||||
case T_model:
|
||||
module->Add3DModel( parse3DModel() );
|
||||
{
|
||||
MODULE_3D_SETTINGS* model = parse3DModel();
|
||||
module->Add3DModel( model );
|
||||
delete model;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue