diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-29 10:24:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-29 10:24:05 +0400 |
commit | 33fab0f7d7433e8d942c6eb448a14da05f1a22f2 (patch) | |
tree | 3d32596f4c58871f4a6189c02c4425e51c6adde6 /source/blender/blenkernel/intern/curve.c | |
parent | 7a950c287692dc44edc23eb9daf865de8e115307 (diff) |
fix for user counts with text3d bold/italic fonts.
Diffstat (limited to 'source/blender/blenkernel/intern/curve.c')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 358dd1914e7..d13738808d1 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -74,12 +74,22 @@ void unlink_curve(Curve *cu) for(a=0; a<cu->totcol; a++) { if(cu->mat[a]) cu->mat[a]->id.us--; - cu->mat[a]= 0; + cu->mat[a]= NULL; } if(cu->vfont) cu->vfont->id.us--; - cu->vfont= 0; + cu->vfont= NULL; + + if(cu->vfontb) cu->vfontb->id.us--; + cu->vfontb= NULL; + + if(cu->vfonti) cu->vfonti->id.us--; + cu->vfonti= NULL; + + if(cu->vfontbi) cu->vfontbi->id.us--; + cu->vfontbi= NULL; + if(cu->key) cu->key->id.us--; - cu->key= 0; + cu->key= NULL; } /* frees editcurve entirely */ @@ -210,9 +220,12 @@ void make_local_curve(Curve *cu) */ if(cu->id.lib==0) return; - - if(cu->vfont) cu->vfont->id.lib= 0; - + + if(cu->vfont) cu->vfont->id.lib= NULL; + if(cu->vfontb) cu->vfontb->id.lib= NULL; + if(cu->vfonti) cu->vfonti->id.lib= NULL; + if(cu->vfontbi) cu->vfontbi->id.lib= NULL; + if(cu->id.us==1) { cu->id.lib= 0; cu->id.flag= LIB_LOCAL; |