Fix T56187: Crash using cursor tool in Edit/Sculpt and Weight Paint mode

The transform tried to calculate the multiframe falloff, but there was not any stroke to do that.
This commit is contained in:
2018-08-01 10:17:05 +02:00
parent 3f5d3aa057
commit c06bed25c7

View File

@@ -4636,7 +4636,12 @@ static void applyTranslationValue(TransInfo *t, const float vec[3])
if (t->options & CTX_GPENCIL_STROKES) {
/* grease pencil multiframe falloff */
bGPDstroke *gps = (bGPDstroke *)td->extra;
mul_v3_fl(tvec, td->factor * gps->runtime.multi_frame_falloff);
if (gps != NULL) {
mul_v3_fl(tvec, td->factor * gps->runtime.multi_frame_falloff);
}
else {
mul_v3_fl(tvec, td->factor);
}
}
else {
/* proportional editing falloff */