diff options
author | Antonioya <blendergit@gmail.com> | 2018-09-30 13:54:17 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-09-30 13:54:17 +0300 |
commit | 419fd80d46ab7be516cd505d062406dca87d3b65 (patch) | |
tree | cbc6a1d5e8fd74f0595c06d2e2ecd66cd62fcd1b /source | |
parent | 4a724081247205f1ebe34b2cac35bdfc76512b67 (diff) |
GP: Fix error in mutiedit if curve is not available
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index b765e20a1e2..d22c7c8808f 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -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); |