changeset 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 9c24336fa76c
children 469a130e7029
files lwasm/list.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lwasm/list.c	Thu Jan 24 18:24:03 2019 -0700
+++ b/lwasm/list.c	Tue Mar 19 14:37:56 2019 -0600
@@ -324,7 +324,7 @@
 		lw_free(obytes);
 		obytes = NULL;
 	}
-	if ((as -> flags & FLAG_SYMBOLS))
+	if ((as -> flags & FLAG_SYMBOLS) && of)
 		list_symbols(as, of);
 	if (of && of != stdout)
 		fclose(of);