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:
authorTianwei Shen <shentianweipku@gmail.com>2016-08-11 20:25:55 +0300
committerTianwei Shen <shentianweipku@gmail.com>2016-08-11 20:25:55 +0300
commitf4fd5dc6e19864761c8be2465071a7439f10e87c (patch)
tree59f7c39f7d4de5f724645f6bf8819e8c406a0318 /source/blender/editors/space_clip
parentd2e8a2dec1ba9b14d369d9d7693ccacc456e4fdb (diff)
fix error in ED_space_clip_get_clip_in_region
didn't consider the case that regiondata may be a NULL pointer. Since dopesheet and graph are also Movie Editors and they don't have regiondata. Other drawing code also has this problem, so it is not fully solved. Will need to initialize regiondata for dopesheet and graph.
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r--source/blender/editors/space_clip/clip_editor.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index 59f20e2f628..83d001923e2 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -588,7 +588,12 @@ MovieClip *ED_space_clip_get_secondary_clip(SpaceClip *sc)
MovieClip *ED_space_clip_get_clip_in_region(SpaceClip *sc, ARegion *ar)
{
RegionSpaceClip *rsc = ar->regiondata;
- if (rsc->flag == RSC_MAIN_CLIP) {
+
+ /* dopsheet and graph don't have regiondata, so just return the main clip */
+ if (!rsc) {
+ return ED_space_clip_get_clip(sc);
+ }
+ else if (rsc->flag == RSC_MAIN_CLIP) {
return ED_space_clip_get_clip(sc);
}
else { //rsc->flag == RSC_SECONDARY_CLIP