Commit: 482823a1abc4e1fae7d010940b6b4bc867205f0d
Author: Bastien Montagne
Date: Sun Feb 2 20:34:23 2014 +0100
https://developer.blender.org/rB482823a1abc4e1fae7d010940b6b4bc867205f0d
Fix T38435: Crash when pressing MMB in walk mode
Snap code may be called with a NULL region, add check about this and assume
ray_start is OK in this case!
===================================================================
M source/blender/editors/transform/transform_snap.c
===================================================================
diff --git a/source/blender/editors/transform/transform_snap.c
b/source/blender/editors/transform/transform_snap.c
index 9f48dc8..4499a9a 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -1542,8 +1542,9 @@ static bool snapDerivedMesh(short snap_mode, ARegion *ar,
Object *ob, DerivedMes
/* Only use closer ray_start in case of ortho
view! In perspective one, ray_start may already
* been *inside* boundbox, leading to snap
failures (see T38409).
+ * Note also ar might be null (see T38435), in
this case we assume ray_start is ok!
*/
- if (!((RegionView3D
*)ar->regiondata)->is_persp) {
+ if (ar && !((RegionView3D
*)ar->regiondata)->is_persp) {
float ray_org_local[3];
copy_v3_v3(ray_org_local, ray_origin);
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs