summaryrefslogtreecommitdiff
path: root/lib/glob/xmbsrtowcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/glob/xmbsrtowcs.c')
-rw-r--r--lib/glob/xmbsrtowcs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/glob/xmbsrtowcs.c b/lib/glob/xmbsrtowcs.c
index f8c29b9..83b67b4 100644
--- a/lib/glob/xmbsrtowcs.c
+++ b/lib/glob/xmbsrtowcs.c
@@ -145,7 +145,8 @@ xdupmbstowcs (destp, indicesp, src)
/* In case SRC or DESP is NULL, conversion doesn't take place. */
if (src == NULL || destp == NULL)
{
- *destp = NULL;
+ if (destp)
+ *destp = NULL;
return (size_t)-1;
}