[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26009] trunk/blender/source/blender/ editors/space_view3d/view3d_draw.c: fix for possible crash with the boundbox of a mesh used when freed.
Campbell Barton
ideasman42 at gmail.com
Fri Jan 15 00:59:13 CET 2010
Revision: 26009
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26009
Author: campbellbarton
Date: 2010-01-15 00:59:13 +0100 (Fri, 15 Jan 2010)
Log Message:
-----------
fix for possible crash with the boundbox of a mesh used when freed.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
Modified: trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_draw.c 2010-01-14 22:45:56 UTC (rev 26008)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_draw.c 2010-01-14 23:59:13 UTC (rev 26009)
@@ -1493,7 +1493,7 @@
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 @@
/* 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 @@
}
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);
}
More information about the Bf-blender-cvs
mailing list