forked from bartvdbraak/blender
fix [#30542] Shear Vertical Seg Faults Blender
honor the T_FREE_CUSTOMDATA flag.
This commit is contained in:
parent
5788de8408
commit
be7477c638
@ -2454,7 +2454,7 @@ int handleEventShear(TransInfo *t, wmEvent *event)
|
||||
initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_ABSOLUTE);
|
||||
t->customData = NULL;
|
||||
}
|
||||
|
||||
|
||||
status = 1;
|
||||
}
|
||||
|
||||
|
@ -4204,9 +4204,9 @@ static void freeSeqData(TransInfo *t)
|
||||
}
|
||||
}
|
||||
|
||||
if (t->customData) {
|
||||
if ((t->customData != NULL) && (t->flag & T_FREE_CUSTOMDATA)) {
|
||||
MEM_freeN(t->customData);
|
||||
t->customData= NULL;
|
||||
t->customData = NULL;
|
||||
}
|
||||
if (t->data) {
|
||||
MEM_freeN(t->data); // XXX postTrans usually does this
|
||||
@ -4281,7 +4281,8 @@ static void createTransSeqData(bContext *C, TransInfo *t)
|
||||
|
||||
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransSeq TransData");
|
||||
td2d = t->data2d = MEM_callocN(t->total*sizeof(TransData2D), "TransSeq TransData2D");
|
||||
tdsq = t->customData= MEM_callocN(t->total*sizeof(TransDataSeq), "TransSeq TransDataSeq");
|
||||
tdsq = t->customData = MEM_callocN(t->total*sizeof(TransDataSeq), "TransSeq TransDataSeq");
|
||||
t->flag |= T_FREE_CUSTOMDATA;
|
||||
|
||||
|
||||
|
||||
|
@ -1245,7 +1245,7 @@ void postTrans (bContext *C, TransInfo *t)
|
||||
/* Can take over freeing t->data and data2d etc... */
|
||||
t->customFree(t);
|
||||
}
|
||||
else if (t->customData) {
|
||||
else if ((t->customData != NULL) && (t->flag & T_FREE_CUSTOMDATA)) {
|
||||
MEM_freeN(t->customData);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user