GP: Fix unreported crash when click+drag in edit mode

This commit is contained in:
Antonio Vazquez 2018-09-26 16:07:44 +02:00
parent 150cba73c9
commit 9ac5eae433
1 changed files with 6 additions and 5 deletions

View File

@ -1863,11 +1863,12 @@ void calculateCenterCursor(TransInfo *t, float r_center[3])
td = tc->data;
Object *ob = td->ob;
sub_v3_v3v3(r_center, r_center, ob->obmat[3]);
copy_m3_m4(mat, ob->obmat);
invert_m3_m3(imat, mat);
mul_m3_v3(imat, r_center);
if (ob) {
sub_v3_v3v3(r_center, r_center, ob->obmat[3]);
copy_m3_m4(mat, ob->obmat);
invert_m3_m3(imat, mat);
mul_m3_v3(imat, r_center);
}
}
}
}