Fix T60781: DOF Distance (pick) crashes
From own recent changes c8e75c2b00
This commit is contained in:
parent
3eebf9ef06
commit
2e5663c2c6
Notes:
blender-bot
2023-02-14 03:59:43 +01:00
Referenced by issue #60781, DOF Distance (pick) causes crash
|
@ -111,9 +111,13 @@ static int depthdropper_init(bContext *C, wmOperator *op)
|
|||
if (v3d->camera && v3d->camera->data && !ID_IS_LINKED(v3d->camera->data)) {
|
||||
RNA_id_pointer_create(v3d->camera->data, &ddr->ptr);
|
||||
ddr->prop = RNA_struct_find_property(&ddr->ptr, "dof_distance");
|
||||
ddr->is_undo = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
ddr->is_undo = UI_but_flag_is_set(but, UI_BUT_UNDO);
|
||||
}
|
||||
|
||||
if ((ddr->ptr.data == NULL) ||
|
||||
(ddr->prop == NULL) ||
|
||||
|
@ -125,8 +129,6 @@ static int depthdropper_init(bContext *C, wmOperator *op)
|
|||
}
|
||||
op->customdata = ddr;
|
||||
|
||||
ddr->is_undo = UI_but_flag_is_set(but, UI_BUT_UNDO);
|
||||
|
||||
ddr->art = art;
|
||||
ddr->draw_handle_pixel = ED_region_draw_cb_activate(art, depthdropper_draw_cb, ddr, REGION_DRAW_POST_PIXEL);
|
||||
ddr->init_depth = RNA_property_float_get(&ddr->ptr, ddr->prop);
|
||||
|
|
Loading…
Reference in New Issue