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
This commit is contained in:
Jeroen Bakker 2019-12-30 09:21:29 +01:00 committed by Jeroen Bakker
parent c2a37867f2
commit 79476a9c0a
1 changed files with 2 additions and 2 deletions

View File

@ -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;