[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19134] branches/blender2.5/blender/source /blender/editors/mesh/editmesh_add.c: Running the OBJECT_OT_mesh_add operator outside the 3d view would crash.

Campbell Barton ideasman42 at gmail.com
Fri Feb 27 22:27:56 CET 2009


Revision: 19134
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19134
Author:   campbellbarton
Date:     2009-02-27 22:27:03 +0100 (Fri, 27 Feb 2009)

Log Message:
-----------
Running the OBJECT_OT_mesh_add operator outside the 3d view would crash.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/mesh/editmesh_add.c

Modified: branches/blender2.5/blender/source/blender/editors/mesh/editmesh_add.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/mesh/editmesh_add.c	2009-02-27 18:49:25 UTC (rev 19133)
+++ branches/blender2.5/blender/source/blender/editors/mesh/editmesh_add.c	2009-02-27 21:27:03 UTC (rev 19134)
@@ -1267,13 +1267,13 @@
 	Object *obedit= CTX_data_edit_object(C);
 	Scene *scene = CTX_data_scene(C);
 	View3D *v3d =CTX_wm_view3d(C);
-	ARegion *ar= CTX_wm_region(C);
+	RegionView3D *rv3d= CTX_wm_region_view3d(C);
 	float *curs, mat[3][3], vmat[3][3], cmat[3][3], imat[3][3];
 	
 	Mat4One(primmat);
 	
-	if(ar)
-		Mat3CpyMat4(vmat, ((RegionView3D *)ar->regiondata)->viewmat);
+	if(rv3d)
+		Mat3CpyMat4(vmat, rv3d->viewmat);
 	else
 		Mat3One(vmat);
 	





More information about the Bf-blender-cvs mailing list