Merge branch 'blender-v3.1-release'

This commit is contained in:
Philipp Oeser
2022-02-16 08:41:40 +01:00

View File

@@ -6059,7 +6059,8 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
view_data = IDP_GetPropertyTypeFromGroup(idgroup, PROJ_VIEW_DATA_ID, IDP_ARRAY);
/* type check to make sure its ok */
if (view_data->len != PROJ_VIEW_DATA_SIZE || view_data->subtype != IDP_FLOAT) {
if (view_data != NULL &&
(view_data->len != PROJ_VIEW_DATA_SIZE || view_data->subtype != IDP_FLOAT)) {
BKE_report(op->reports, RPT_ERROR, "Image project data invalid");
return OPERATOR_CANCELLED;
}