[Bf-blender-cvs] [e5c6dd39649] blender2.8: Fix crash showing footage information for non-animation movie clips
Sergey Sharybin
noreply at git.blender.org
Tue Dec 18 12:06:45 CET 2018
Commit: e5c6dd396494a617303c6cea956343e4303403b8
Author: Sergey Sharybin
Date: Tue Dec 18 12:06:16 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBe5c6dd396494a617303c6cea956343e4303403b8
Fix crash showing footage information for non-animation movie clips
===================================================================
M source/blender/editors/space_clip/clip_buttons.c
===================================================================
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 {
More information about the Bf-blender-cvs
mailing list