changeset 426:652eee8f0c82

Fixed lw_expr_destroy() to not crash on NULL
author lost@l-w.ca
date Sun, 19 Sep 2010 10:40:37 -0600
parents 7c0598f69cf3
children 0f2d9a943e96
files lwlib/lw_expr.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lwlib/lw_expr.c	Fri Aug 13 18:51:12 2010 -0600
+++ b/lwlib/lw_expr.c	Sun Sep 19 10:40:37 2010 -0600
@@ -91,6 +91,8 @@
 void lw_expr_destroy(lw_expr_t E)
 {
 	struct lw_expr_opers *o;
+	if (!E)
+		return;
 	for (o = E -> operands; o; o = o -> next)
 		lw_expr_destroy(o -> p);
 	if (E -> type == lw_expr_type_var)