Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Romanov <a.romanov@blend4web.com>2016-12-23 16:51:26 +0300
committerAlexander Romanov <a.romanov@blend4web.com>2016-12-23 16:51:26 +0300
commitb47c912f4be877bf5511117864dfc2a5b30c0dca (patch)
tree4558fd07f035287757e14d8942362822021f6d96 /source/blender/editors/space_image
parentd0335796a8f1acb8b1a1c2336b382da82e2370ee (diff)
Fix (unreported) crash in 'Match movie length operator' in case of lost video texture file
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_ops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index f5da7d57010..6a1c0e7e4bf 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1475,7 +1475,10 @@ static int image_match_len_exec(bContext *C, wmOperator *UNUSED(op))
if (!ima || !iuser || !BKE_image_has_anim(ima))
return OPERATOR_CANCELLED;
- iuser->frames = IMB_anim_get_duration(((ImageAnim *) ima->anims.first)->anim, IMB_TC_RECORD_RUN);
+ struct ImageAnim *anim = ((ImageAnim *)ima->anims.first)->anim;
+ if (!anim)
+ return OPERATOR_CANCELLED;
+ iuser->frames = IMB_anim_get_duration(anim, IMB_TC_RECORD_RUN);
BKE_image_user_frame_calc(iuser, scene->r.cfra, 0);
return OPERATOR_FINISHED;