Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-09-20 21:23:49 +0300
committerHans Goudey <h.goudey@me.com>2020-09-20 21:23:49 +0300
commite14894aad2b80866eb242d2b22fe1dcda2817c0f (patch)
tree95630c6c65521bdc777d03c463beaaeda9a3a31e /source/blender/editors
parent0d5aa352d37dc496a07b88d993939c49bcbe8b1d (diff)
Fix T80993: Crash duplicating inactive workspace
We need to check for the property editor's runtime struct before duplicating it.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c6
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;
}