diff options
Diffstat (limited to 'source/blender/blenkernel/intern/anim_path.c')
-rw-r--r-- | source/blender/blenkernel/intern/anim_path.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/anim_path.c b/source/blender/blenkernel/intern/anim_path.c index de470a15041..43af55e9b6b 100644 --- a/source/blender/blenkernel/intern/anim_path.c +++ b/source/blender/blenkernel/intern/anim_path.c @@ -230,14 +230,6 @@ static bool binary_search_anim_path(const float *accum_len_arr, } } -/** - * Calculate the deformation implied by the curve path at a given parametric position, - * and returns whether this operation succeeded. - * - * \param ctime: Time is normalized range <0-1>. - * - * \return success. - */ bool BKE_where_on_path(const Object *ob, float ctime, float r_vec[4], @@ -254,6 +246,10 @@ bool BKE_where_on_path(const Object *ob, CLOG_WARN(&LOG, "No curve cache!"); return false; } + if (ob->runtime.curve_cache->anim_path_accum_length == NULL) { + CLOG_WARN(&LOG, "No anim path!"); + return false; + } /* We only use the first curve. */ BevList *bl = ob->runtime.curve_cache->bev.first; if (bl == NULL || !bl->nr) { |