diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-01-04 16:07:38 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-01-04 16:07:38 +0300 |
commit | a9163f7d222d9d4949987c9690f44bdb6e43f163 (patch) | |
tree | 72c9c0f099dd2d10e25017caeb500e8cf3efadf2 /source/blender/editors/space_text/text_ops.c | |
parent | 351a9d084f59a6d11be9148830cec86eacb85529 (diff) |
Fix (IRC reported) bad handling of Text data-block user count.
Reported on IRC by dfelinto, thanks.
Root of the issue was that opening a new text file would create
datablock with one user, when Text editor is actually a 'user one' user.
This was leaving Text datablocks in inconsitent user count, and
generating asserts in BKE_library area.
Also changed a weird piece of code related to that extra user thing in
main remapping func.
Diffstat (limited to 'source/blender/editors/space_text/text_ops.c')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 83012eac39e..df3620843ad 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -254,6 +254,7 @@ static int text_open_exec(bContext *C, wmOperator *op) } else if (st) { st->text = text; + id_us_ensure_real(&text->id); st->left = 0; st->top = 0; st->scroll_accum[0] = 0.0f; |