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
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-12-18 14:06:16 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-12-18 14:06:40 +0300
commite5c6dd396494a617303c6cea956343e4303403b8 (patch)
tree1d203d192e337e7abcfb985fc1171c6d3b7b77b1 /source
parentf71ae30962651eaf538600584af1c004b4251847 (diff)
Fix crash showing footage information for non-animation movie clips
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_clip/clip_buttons.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c
index 79e632ce1c1..ebe8e802a37 100644
--- a/source/blender/editors/space_clip/clip_buttons.c
+++ b/source/blender/editors/space_clip/clip_buttons.c
@@ -535,10 +535,14 @@ void uiTemplateMovieclipInformation(uiLayout *layout, PointerRNA *ptr, const cha
ofs += BLI_strncpy_rlen(str + ofs, IFACE_(", RGB byte"), sizeof(str) - ofs);
}
- short frs_sec;
- float frs_sec_base;
- if (IMB_anim_get_fps(clip->anim, &frs_sec, &frs_sec_base, true)) {
- ofs += BLI_snprintf(str + ofs, sizeof(str) - ofs, IFACE_(", %.2f fps"), (float)frs_sec / frs_sec_base);
+ if (clip->anim != NULL) {
+ short frs_sec;
+ float frs_sec_base;
+ if (IMB_anim_get_fps(clip->anim, &frs_sec, &frs_sec_base, true)) {
+ ofs += BLI_snprintf(str + ofs, sizeof(str) - ofs,
+ IFACE_(", %.2f fps"),
+ (float)frs_sec / frs_sec_base);
+ }
}
}
else {