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-14 21:50:40 +0300
committerHans Goudey <h.goudey@me.com>2020-09-14 21:50:40 +0300
commitd9b0afcf196811353384805065aa7933db773e13 (patch)
tree49840d3a726d005c2201a518e0cb6a3edf8123dc /source/blender/editors/space_buttons/space_buttons.c
parentd23036e5101eabd5d851a3d6dbaeffec58f631f7 (diff)
parentdcfbee5c8075c6513c380401f5e53446cd55dd1e (diff)
Merge branch 'property-search-highlight-tabs' into property-search-all-tabs-v2
Diffstat (limited to 'source/blender/editors/space_buttons/space_buttons.c')
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index cd31598b0e6..dbdfffb2d56 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -110,21 +110,30 @@ static void buttons_free(SpaceLink *sl)
BLI_freelistN(&ct->users);
MEM_freeN(ct);
}
+
+ BLI_assert(sbuts->runtime != NULL);
+ MEM_freeN(sbuts->runtime);
}
/* spacetype; init callback */
-static void buttons_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area))
+static void buttons_init(struct wmWindowManager *UNUSED(wm), ScrArea *area)
{
+ SpaceProperties *sbuts = (SpaceProperties *)area->spacedata.first;
+
+ sbuts->runtime = MEM_mallocN(sizeof(SpaceProperties_Runtime), __func__);
+ sbuts->runtime->search_string[0] = '\0';
}
static SpaceLink *buttons_duplicate(SpaceLink *sl)
{
+ SpaceProperties *sfile_old = (SpaceProperties *)sl;
SpaceProperties *sbutsn = MEM_dupallocN(sl);
/* clear or remove stuff from old */
sbutsn->path = NULL;
sbutsn->texuser = NULL;
- sbutsn->runtime.search_string[0] = '\0';
+ sbutsn->runtime = MEM_dupallocN(sfile_old->runtime);
+ sbutsn->runtime->search_string[0] = '\0';
return (SpaceLink *)sbutsn;
}