Fix bone-size crash

Own regression from multi-object transform.
This commit is contained in:
Campbell Barton 2018-05-15 11:36:39 +02:00
parent e0903e20a7
commit b3d4f99d48
2 changed files with 4 additions and 0 deletions

@ -551,6 +551,7 @@ typedef struct TransInfo {
/* transinfo->flag */
#define T_OBJECT (1 << 0)
/** \note We could remove 'T_EDIT' and use 'obedit_type', for now ensure they're in sync. */
#define T_EDIT (1 << 1)
#define T_POSE (1 << 2)
#define T_TEXTURE (1 << 3)

@ -8504,6 +8504,7 @@ void createTransData(bContext *C, TransInfo *t)
if (t->mode == TFM_BONESIZE) {
t->flag &= ~(T_EDIT | T_POINTS);
t->flag |= T_POSE;
t->obedit_type = -1;
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
tc->poseobj = tc->obedit;
@ -8582,4 +8583,6 @@ void createTransData(bContext *C, TransInfo *t)
/* Check that 'countAndCleanTransDataContainer' ran. */
BLI_assert(t->data_len_all != -1);
BLI_assert((!(t->flag & T_EDIT)) == (!(t->obedit_type != -1)));
}