[Bf-blender-cvs] [e14894aad2b] master: Fix T80993: Crash duplicating inactive workspace
Hans Goudey
noreply at git.blender.org
Sun Sep 20 20:24:06 CEST 2020
Commit: e14894aad2b80866eb242d2b22fe1dcda2817c0f
Author: Hans Goudey
Date: Sun Sep 20 13:23:49 2020 -0500
Branches: master
https://developer.blender.org/rBe14894aad2b80866eb242d2b22fe1dcda2817c0f
Fix T80993: Crash duplicating inactive workspace
We need to check for the property editor's runtime struct
before duplicating it.
===================================================================
M source/blender/editors/space_buttons/space_buttons.c
===================================================================
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;
}
More information about the Bf-blender-cvs
mailing list