diff options
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/space_buttons.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index a12b7bddf9f..a4eddd460b0 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -132,8 +132,10 @@ static SpaceLink *buttons_duplicate(SpaceLink *sl) /* clear or remove stuff from old */ sbutsn->path = NULL; sbutsn->texuser = NULL; - sbutsn->runtime = MEM_dupallocN(sfile_old->runtime); - sbutsn->runtime->search_string[0] = '\0'; + if (sfile_old->runtime != NULL) { + sbutsn->runtime = MEM_dupallocN(sfile_old->runtime); + sbutsn->runtime->search_string[0] = '\0'; + } return (SpaceLink *)sbutsn; } |