diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-12-18 14:06:16 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-12-18 14:06:40 +0300 |
commit | e5c6dd396494a617303c6cea956343e4303403b8 (patch) | |
tree | 1d203d192e337e7abcfb985fc1171c6d3b7b77b1 /source/blender/editors/space_clip/clip_buttons.c | |
parent | f71ae30962651eaf538600584af1c004b4251847 (diff) |
Fix crash showing footage information for non-animation movie clips
Diffstat (limited to 'source/blender/editors/space_clip/clip_buttons.c')
-rw-r--r-- | source/blender/editors/space_clip/clip_buttons.c | 12 |
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 { |