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:
authorCampbell Barton <ideasman42@gmail.com>2018-01-10 09:45:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-01-10 09:45:34 +0300
commit6e6b79de35fbe5f4cf0c79dcd854827fc0c95499 (patch)
treef739853078a18670dd58d8fa862fef51a51e4644 /source/blender/blenkernel/intern/brush.c
parentcacba951eaa266c7fc53cd25be6afc0fb7951425 (diff)
Fix brush user count
New brushes had 2 users on adding. Caused assert removing them after.
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r--source/blender/blenkernel/intern/brush.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 230db6dccff..8ad9cbb2625 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -152,7 +152,8 @@ Brush *BKE_brush_add(Main *bmain, const char *name, short ob_mode)
{
Brush *brush;
- brush = BKE_libblock_alloc(bmain, ID_BR, name, 0);
+ /* Use no refcount, fakeuser is added in 'BKE_brush_init' */
+ brush = BKE_libblock_alloc(bmain, ID_BR, name, LIB_ID_CREATE_NO_USER_REFCOUNT);
BKE_brush_init(brush);