summaryrefslogtreecommitdiff
path: root/src/core/wee-string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/wee-string.c')
-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 21a1fca4d..efc13b6cf 100644
--- a/src/core/wee-string.c
+++ b/src/core/wee-string.c
@@ -74,6 +74,9 @@ string_strndup (const char *string, int length)
{
char *result;
+ if (!string)
+ return NULL;
+
if ((int)strlen (string) < length)
return strdup (string);