Crash in MMB moves (etc): commit of today was reading NULL pointer.

This commit is contained in:
2011-08-03 14:21:49 +00:00
parent 48a699d15b
commit 9eef0646d4

View File

@@ -887,6 +887,7 @@ void resetTransRestrictions(TransInfo *t)
t->flag &= ~T_ALL_RESTRICTIONS;
}
/* the *op can be NULL */
int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
{
Scene *sce = CTX_data_scene(C);
@@ -1015,7 +1016,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
}
/* initialize UV transform from */
if (RNA_struct_find_property(op->ptr, "correct_uv")) {
if (op && RNA_struct_find_property(op->ptr, "correct_uv")) {
if(RNA_property_is_set(op->ptr, "correct_uv")) {
if(RNA_boolean_get(op->ptr, "correct_uv")) {
t->settings->uvcalc_flag |= UVCALC_TRANSFORM_CORRECT;