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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-06-10 18:22:49 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-06-10 18:24:08 +0300
commit825892ae7aab423124ee39524ca0278e8ba8633b (patch)
treea384b51756622b9498a5434b67c995d714990f5a /source/blender/editors/space_clip
parent3560e36ee93f74d2ec5f02a30381eab3e1d66e62 (diff)
Fix T45017: Crash when running 'track markers' operator with no clip loaded.
CLIP_OT_track_markers was missing a poll callback.
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r--source/blender/editors/space_clip/clip_editor.c5
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c2
2 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 d67c03f3622..0dc41431aeb 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -219,7 +219,10 @@ int ED_space_clip_get_clip_frame_number(SpaceClip *sc)
{
MovieClip *clip = ED_space_clip_get_clip(sc);
- return BKE_movieclip_remap_scene_to_clip_frame(clip, sc->user.framenr);
+ if (clip) {
+ return BKE_movieclip_remap_scene_to_clip_frame(clip, sc->user.framenr);
+ }
+ return 0;
}
ImBuf *ED_space_clip_get_buffer(SpaceClip *sc)
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index 538c1a4e5ea..5e64d87facd 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -1426,6 +1426,7 @@ static int track_markers_invoke(bContext *C, wmOperator *op, const wmEvent *UNUS
}
clip = ED_space_clip_get_clip(sc);
+ BLI_assert(clip);
framenr = ED_space_clip_get_clip_frame_number(sc);
if (WM_jobs_test(CTX_wm_manager(C), sa, WM_JOB_TYPE_ANY)) {
@@ -1504,6 +1505,7 @@ void CLIP_OT_track_markers(wmOperatorType *ot)
ot->exec = track_markers_exec;
ot->invoke = track_markers_invoke;
ot->modal = track_markers_modal;
+ ot->poll = ED_space_clip_tracking_poll;
/* flags */
ot->flag = OPTYPE_UNDO;