Ensure model file output stream is valid before writing to it
Fixes KICAD-74V
This commit is contained in:
parent
e67eae90e9
commit
90ace0fcaf
|
@ -1695,6 +1695,13 @@ void ALTIUM_PCB::ParseModelsData( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile
|
|||
wxZlibInputStream zlibInputStream( stepStream );
|
||||
|
||||
wxFFileOutputStream outputStream( storagePath.GetFullPath() );
|
||||
|
||||
if( !outputStream.IsOk() )
|
||||
{
|
||||
wxLogError( _( "Unable to write file '%s'." ), storagePath.GetFullPath() );
|
||||
continue;
|
||||
}
|
||||
|
||||
outputStream.Write( zlibInputStream );
|
||||
outputStream.Close();
|
||||
|
||||
|
|
Loading…
Reference in New Issue