diff options
Diffstat (limited to 'libcaja-private/caja-autorun.c')
-rw-r--r-- | libcaja-private/caja-autorun.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libcaja-private/caja-autorun.c b/libcaja-private/caja-autorun.c index e60fe8a6..04033445 100644 --- a/libcaja-private/caja-autorun.c +++ b/libcaja-private/caja-autorun.c @@ -136,7 +136,10 @@ add_elem_to_str_array (char **v, const char *s) len = v != NULL ? g_strv_length (v) : 0; r = g_new0 (char *, len + 2); - memcpy (r, v, len * sizeof (char *)); + + if (v) + memcpy (r, v, len * sizeof (char *)); + r[len] = g_strdup (s); r[len+1] = NULL; g_free (v); |