diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-15 02:59:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-15 02:59:13 +0300 |
commit | 4770cc031d6897a9384f39e61eadba3b8ace8250 (patch) | |
tree | 6d3015d1e71bf0d191e947cf89f46fe44098b049 /source/blender/editors | |
parent | 6f8ee9b0f9070636bdeb68b86b5b818af2f41f7d (diff) |
fix for possible crash with the boundbox of a mesh used when freed.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 8af16641c00..914344647bd 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1493,7 +1493,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas ListBase *lb; DupliObject *dob; Base tbase; - BoundBox *bb= NULL; + BoundBox bb; /* use a copy because draw_object, calls clear_mesh_caches */ GLuint displist=0; short transflag, use_displist= -1; /* -1 is initialize */ char dt, dtx; @@ -1535,7 +1535,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas /* disable boundbox check for list creation */ object_boundbox_flag(dob->ob, OB_BB_DISABLED, 1); /* need this for next part of code */ - bb= object_get_boundbox(dob->ob); + bb= *object_get_boundbox(dob->ob); unit_m4(dob->ob->obmat); /* obmat gets restored */ @@ -1550,7 +1550,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas } if(use_displist) { wmMultMatrix(dob->mat); - if(boundbox_clip(rv3d, dob->mat, bb)) + if(boundbox_clip(rv3d, dob->mat, &bb)) glCallList(displist); wmLoadMatrix(rv3d->viewmat); } |