[Bf-blender-cvs] [bffd21b] soc-2013-paint: Fix crash after deleting points and adding points.
Antony Riakiotakis
noreply at git.blender.org
Sun Apr 20 17:45:47 CEST 2014
Commit: bffd21b38565f6234bdc2a561067595887bcee31
Author: Antony Riakiotakis
Date: Sun Apr 20 18:34:03 2014 +0300
https://developer.blender.org/rBbffd21b38565f6234bdc2a561067595887bcee31
Fix crash after deleting points and adding points.
active index was in an invalid state.
===================================================================
M source/blender/editors/sculpt_paint/paint_curve.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/paint_curve.c b/source/blender/editors/sculpt_paint/paint_curve.c
index 4c66dc3..ddad1c8 100644
--- a/source/blender/editors/sculpt_paint/paint_curve.c
+++ b/source/blender/editors/sculpt_paint/paint_curve.c
@@ -320,12 +320,12 @@ static int paintcurve_delete_point_exec(bContext *C, wmOperator *op)
if (!(pcp->bez.f2 & DELETE_TAG)) {
points_new[j] = pc->points[i];
- if (i == pc->active_point) {
- pc->active_point = j;
+ if ((i + 1) == pc->active_point) {
+ pc->active_point = j + 1;
}
j++;
}
- else if (i == pc->active_point) {
+ else if ((i + 1) == pc->active_point) {
/* prefer previous point */
pc->active_point = j;
}
More information about the Bf-blender-cvs
mailing list