comparison lwasm/list.c @ 483:40c32a0af8c8

Fix crash when --symbols specified without --list
author William Astle <lost@l-w.ca>
date Tue, 19 Mar 2019 14:37:56 -0600
parents 74d0c394666e
children 10f62dc61a75
comparison
equal deleted inserted replaced
482:9c24336fa76c 483:40c32a0af8c8
322 if (of) fprintf(of, "\n"); 322 if (of) fprintf(of, "\n");
323 } 323 }
324 lw_free(obytes); 324 lw_free(obytes);
325 obytes = NULL; 325 obytes = NULL;
326 } 326 }
327 if ((as -> flags & FLAG_SYMBOLS)) 327 if ((as -> flags & FLAG_SYMBOLS) && of)
328 list_symbols(as, of); 328 list_symbols(as, of);
329 if (of && of != stdout) 329 if (of && of != stdout)
330 fclose(of); 330 fclose(of);
331 } 331 }