From 79476a9c0ab9e3f29d32a87aa8f9d859f2961cb9 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Mon, 30 Dec 2019 09:21:29 +0100 Subject: Tracking: Selection Crash Blender crashes when selecting a marker in the 3d viewport that is from the non active scene camera. This patch will solve this crash, but introduced a new scenario that isn't thought out. In the new scenario it is still hard to select a marker via the 3d viewport. I would expect that when selecting a marker in this case would select the camera where the marker belongs to and select the marker that is under the mouse button. Reviewed By: Sergey Sharybin Differential Revision: https://developer.blender.org/D6360 --- source/blender/editors/space_view3d/view3d_select.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_view3d') diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 092142a83cd..85e9a2d7680 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -2077,7 +2077,8 @@ static bool ed_object_select_pick(bContext *C, if (has_bones && basact) { if (basact->object->type == OB_CAMERA) { - if (oldbasact == basact) { + MovieClip *clip = BKE_object_movieclip_get(scene, basact->object, false); + if (clip != NULL && oldbasact == basact) { int i, hitresult; bool changed = false; @@ -2094,7 +2095,6 @@ static bool ed_object_select_pick(bContext *C, * in height word, this buffer value belongs to camera. not to bundle */ if (buffer[4 * i + 3] & 0xFFFF0000) { - MovieClip *clip = BKE_object_movieclip_get(scene, basact->object, false); MovieTracking *tracking = &clip->tracking; ListBase *tracksbase; MovieTrackingTrack *track; -- cgit v1.2.3