In AllianceFramework::createCell(), handle non-existent library.

This commit is contained in:
Jean-Paul Chaput 2019-11-08 00:18:23 +01:00
parent 8035b31f27
commit a8a904180d
1 changed files with 5 additions and 1 deletions

View File

@ -495,8 +495,12 @@ namespace CRL {
// The cell is not in the CATAL : add an entry.
if ( state == NULL ) state = _catalog.getState ( name, true );
if ( library == NULL )
if ( library == NULL ) {
if (_libraries.empty())
throw Error( "AllianceFramework::createCell(): Libraries are not set up, maybe an initialization problem." );
library = _libraries[0];
}
if ( !state->getCell() ) {
state->setPhysical ( true );