diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-12 19:54:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-12 19:54:24 +0300 |
commit | 55f68c36574779ae2fac3652466584628b22c633 (patch) | |
tree | e2f55301dda8897bf17f8b8459229d8fa5a67816 /source/blender/editors/space_view3d | |
parent | 9eee1f962d49f14d92c8da4e677e4ee140f4f440 (diff) |
fix for more warnings.
- modifier code was using sizeof() without knowing the sizeof the array when clearing the modifier type array.
- use BLI_snprintf rather then sprintf where the size of the string is known.
- particle drawing code kept a reference to stack float values (not a problem at the moment but would crash if accessed later).
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 8724f2f9def..aa35438a387 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -4070,8 +4070,14 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv psys->lattice= NULL; } - if( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) ) + if(pdd) { + /* drop references to stack memory */ + pdd->ma_r= pdd->ma_g= pdd->ma_b= NULL; + } + + if( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) ) { glLoadMatrixf(rv3d->viewmat); + } } static void draw_update_ptcache_edit(Scene *scene, Object *ob, PTCacheEdit *edit) |