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:
authorBastien Montagne <bastien@blender.org>2022-01-24 20:01:23 +0300
committerBastien Montagne <bastien@blender.org>2022-01-25 11:12:13 +0300
commit1b1693d43f125e8b542bc298dcc6e5360c2a4d11 (patch)
treed1932ba376486e3da4845f9926a66e8ac3da1361
parent2e9b8689e408c9b8b22a0ff21c5fa02d776d2d40 (diff)
Fix (unreported) RNA setter for TextEditor's text ID pointer not ensuring real user.
-rw-r--r--source/blender/makesrna/intern/rna_space.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 05c1a645823..ec9b67deeac 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1861,6 +1861,9 @@ static void rna_SpaceTextEditor_text_set(PointerRNA *ptr,
SpaceText *st = (SpaceText *)(ptr->data);
st->text = value.data;
+ if (st->text != NULL) {
+ id_us_ensure_real((ID *)st->text);
+ }
ScrArea *area = rna_area_from_space(ptr);
if (area) {