summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2012-09-21 21:57:19 +0200
committerSven Verdoolaege <skimo@kotnet.org>2012-09-22 20:43:03 +0200
commit6940256c0e65aa7e5265ea72df433cd2c168c69e (patch)
tree21d6697d29b74336058086feef095b5edcafdf43
parent330f521cb22bea1509fdbafaf78ee99a5f2c0ead (diff)
downloadisl-6940256c0e65aa7e5265ea72df433cd2c168c69e.tar.gz
isl-6940256c0e65aa7e5265ea72df433cd2c168c69e.tar.bz2
isl-6940256c0e65aa7e5265ea72df433cd2c168c69e.zip
isl_printer_print_str: handle NULL input
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
-rw-r--r--isl_printer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/isl_printer.c b/isl_printer.c
index 322244a9..17932708 100644
--- a/isl_printer.c
+++ b/isl_printer.c
@@ -362,6 +362,8 @@ __isl_give isl_printer *isl_printer_print_str(__isl_take isl_printer *p,
{
if (!p)
return NULL;
+ if (!s)
+ return isl_printer_free(p);
return p->ops->print_str(p, s);
}