diff options
author | Bastien Montagne <bastien@blender.org> | 2022-01-24 20:01:23 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-01-25 11:12:13 +0300 |
commit | 1b1693d43f125e8b542bc298dcc6e5360c2a4d11 (patch) | |
tree | d1932ba376486e3da4845f9926a66e8ac3da1361 /source/blender/makesrna/intern/rna_space.c | |
parent | 2e9b8689e408c9b8b22a0ff21c5fa02d776d2d40 (diff) |
Fix (unreported) RNA setter for TextEditor's text ID pointer not ensuring real user.
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 3 |
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) { |