Skip to content

Commit 1498506

Browse files
committed
fix segfault
1 parent c415e49 commit 1498506

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/fedex_plus/classes_wrapper.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,10 @@ void SCOPEPrint( Scope scope, FILES * files, Schema schema, Express model,
203203
fprintf( files -> lib, "\n/* ************** TYPES */\n" );
204204
/* The following was `SCOPEdo_types( scope, t, de ) ... SCOPEod;`
205205
* Modified Jan 2012 by MAP - moving enums to own dictionary */
206-
HASHlistinit_by_type(scope->enum_table,&de,OBJ_TYPE);{
206+
if( scope->enum_table ) {
207+
HASHlistinit_by_type(scope->enum_table,&de,OBJ_TYPE);
207208
Type t;
208-
while ( 0 != ( t = (Type) DICTdo( &de ) ) ) {
209+
while( 0 != ( t = (Type) DICTdo( &de ) ) ) {
209210
// First check for one exception: Say enumeration type B is defined
210211
// to be a rename of enum A. If A is in this schema but has not been
211212
// processed yet, we must wait till it's processed first. The reason

0 commit comments

Comments
 (0)