From 9db72099faa58affc8fc2935efd1efe78c4c1122 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Thu, 27 Apr 2006 01:57:13 -0500 Subject: [PATCH] Accept NULL string --- moo/mooutils/mooscript/mooscript-value.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/moo/mooutils/mooscript/mooscript-value.c b/moo/mooutils/mooscript/mooscript-value.c index fcb39752..3e30e2e3 100644 --- a/moo/mooutils/mooscript/mooscript-value.c +++ b/moo/mooutils/mooscript/mooscript-value.c @@ -125,7 +125,10 @@ MSValue * ms_value_take_string (char *string) { MSValue *val; - g_return_val_if_fail (string != NULL, NULL); + + if (!string) + return ms_value_none (); + val = ms_value_new (&types[MS_VALUE_STRING]); val->str = string; return val;