Fix T63492: CTRL+click on an image in a UV or Image Editor crashes
authorPhilipp Oeser <info@graphics-engineer.com>
Fri, 12 Apr 2019 11:42:52 +0000 (13:42 +0200)
committerPhilipp Oeser <info@graphics-engineer.com>
Tue, 16 Apr 2019 07:38:01 +0000 (09:38 +0200)
Blender

Crash was introduced in rB48e48653c297, rB90f4ff95ed3a

`image_sample_invoke` is used for both `IMAGE_OT_sample` and
`IMAGE_OT_curves_point_set`. IMAGE_OT_curves_point_set didnt have
property `size` defined...

Now defines `size` for `IMAGE_OT_curves_point_set` as well

Reviewers: brecht

Maniphest Tasks: T63492

Differential Revision: https://developer.blender.org/D4675

source/blender/editors/space_image/image_ops.c

index 831be93..85c7d2d 100644 (file)
@@ -3437,6 +3437,11 @@ void IMAGE_OT_curves_point_set(wmOperatorType *ot)
 
        /* properties */
        RNA_def_enum(ot->srna, "point", point_items, 0, "Point", "Set black point or white point for curves");
+
+       PropertyRNA *prop;
+       prop = RNA_def_int(ot->srna, "size", 1, 1, 128, "Sample Size", "", 1, 64);
+       RNA_def_property_subtype(prop, PROP_PIXEL);
+       RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
 #if 0 /* Not ported to 2.5x yet */