GP: Fix error in mutiedit if curve is not available

This commit is contained in:
Antonioya
2018-09-30 12:54:17 +02:00
parent 4a72408124
commit 419fd80d46

View File

@@ -1466,6 +1466,11 @@ float BKE_gpencil_multiframe_falloff_calc(bGPDframe *gpf, int actnum, int f_init
float fnum = 0.5f; /* default mid curve */
float value;
/* check curve is available */
if (cur_falloff == NULL) {
return 1.0f;
}
/* frames to the right of the active frame */
if (gpf->framenum < actnum) {
fnum = (float)(gpf->framenum - f_init) / (actnum - f_init);