summaryrefslogtreecommitdiff
path: root/guile.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2012-01-18 13:31:11 +0000
committerPaul Smith <psmith@gnu.org>2012-01-18 13:31:11 +0000
commit89f7058b99c24607dd371681435cc41e51fedf23 (patch)
treed495c150385138a8609f4f5682e33462a0dd2799 /guile.c
parent9fb4cdeedb2fb7e1a3dd19f2ce77fc5e0022d904 (diff)
downloadgunmake-89f7058b99c24607dd371681435cc41e51fedf23.tar.gz
Handle NULL returns from Guile.
Diffstat (limited to 'guile.c')
-rw-r--r--guile.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/guile.c b/guile.c
index c32821a..2a35e8b 100644
--- a/guile.c
+++ b/guile.c
@@ -92,8 +92,11 @@ func_guile (char *o, char **argv, const char *funcname UNUSED)
if (argv[0] && argv[0][0] != '\0')
{
char *str = scm_with_guile (internal_guile_eval, argv[0]);
- o = variable_buffer_output (o, str, strlen (str));
- free (str);
+ if (str)
+ {
+ o = variable_buffer_output (o, str, strlen (str));
+ free (str);
+ }
}
return o;