diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-01-10 09:45:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-01-10 09:45:34 +0300 |
commit | 6e6b79de35fbe5f4cf0c79dcd854827fc0c95499 (patch) | |
tree | f739853078a18670dd58d8fa862fef51a51e4644 | |
parent | cacba951eaa266c7fc53cd25be6afc0fb7951425 (diff) |
Fix brush user count
New brushes had 2 users on adding.
Caused assert removing them after.
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 3 |
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); |