Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-11-17 15:52:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-17 15:52:56 +0300
commit17aa5ae7967ae2a9a9c6f6eb57576f62ce94ee6f (patch)
tree375cb681c1f6ac098e442bbd7477ddc3fbfa96c2 /source/blender/makesrna/intern/rna_curve.c
parent376d129dc6372c4d09ca9194f40323f5fbf1624a (diff)
bugfix [#24766] Crasher on inserting keyframe on Bezier points [33126]
Diffstat (limited to 'source/blender/makesrna/intern/rna_curve.c')
-rw-r--r--source/blender/makesrna/intern/rna_curve.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 598c5a77c82..11037a0b078 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -95,15 +95,17 @@ static Nurb *curve_nurb_from_point(Curve *cu, const void *point, int *nu_index,
break;
}
}
- }
-
- if(nu_index) {
- *nu_index= i;
}
- if(pt_index) {
- if(nu->type == CU_BEZIER) *pt_index= (int)((BezTriple *)point - nu->bezt);
- else *pt_index= (int)((BPoint *)point - nu->bp);
+ if(nu) {
+ if(nu_index) {
+ *nu_index= i;
+ }
+
+ if(pt_index) {
+ if(nu->type == CU_BEZIER) *pt_index= (int)((BezTriple *)point - nu->bezt);
+ else *pt_index= (int)((BPoint *)point - nu->bp);
+ }
}
return nu;