[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33054] trunk/blender/source/blender/ editors/transform/transform_orientations.c: bugfix [#24697] Trying to run bpy.ops.transform.create_orientation crashes Blender
Campbell Barton
ideasman42 at gmail.com
Sun Nov 14 09:26:44 CET 2010
Revision: 33054
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33054
Author: campbellbarton
Date: 2010-11-14 09:26:44 +0100 (Sun, 14 Nov 2010)
Log Message:
-----------
bugfix [#24697] Trying to run bpy.ops.transform.create_orientation crashes Blender
Modified Paths:
--------------
trunk/blender/source/blender/editors/transform/transform_orientations.c
Modified: trunk/blender/source/blender/editors/transform/transform_orientations.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_orientations.c 2010-11-14 08:11:58 UTC (rev 33053)
+++ trunk/blender/source/blender/editors/transform/transform_orientations.c 2010-11-14 08:26:44 UTC (rev 33054)
@@ -342,15 +342,17 @@
}
void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target) {
- ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
View3D *v3d = CTX_wm_view3d(C);
- TransformOrientation *ts = transform_spaces->first;
- int i;
-
- for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) {
- if (ts == target) {
- v3d->twmode = V3D_MANIP_CUSTOM + i;
- break;
+ if(v3d) {
+ ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
+ TransformOrientation *ts = transform_spaces->first;
+ int i;
+
+ for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) {
+ if (ts == target) {
+ v3d->twmode = V3D_MANIP_CUSTOM + i;
+ break;
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list