summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/wee-string.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/wee-string.c b/src/core/wee-string.c
index 8b47f30c3..b813669f0 100644
--- a/src/core/wee-string.c
+++ b/src/core/wee-string.c
@@ -619,6 +619,9 @@ string_convert_escaped_chars (const char *string)
int pos_output, i, length;
unsigned int value;
+ if (!string)
+ return NULL;
+
/* the output length is always <= to string length */
output = malloc (strlen (string) + 1);
if (!output)