From 0516cd63fa12fbb8a372174a491d4a63a18508e9 Mon Sep 17 00:00:00 2001 From: Pratik Borhade Date: Wed, 27 Aug 2025 12:08:29 +0200 Subject: [PATCH] Fix #144361: Grease Pencil: Crash after deleting the Default Eraser Make sure brush property is never null. Flag will avoid setting brush to null inside `RNA_property_pointer_set`. Flag also prevents `UI_BUT_VALUE_CLEAR/PREDEFINED_EXTRA_OP_ICON_CLEAR` from being set which are responsible for the `X` button (`UI_OT_button_string_clear`). Pull Request: https://projects.blender.org/blender/blender/pulls/144531 --- source/blender/makesrna/intern/rna_sculpt_paint.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.cc b/source/blender/makesrna/intern/rna_sculpt_paint.cc index d1de62c2610..bcb3e138296 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.cc +++ b/source/blender/makesrna/intern/rna_sculpt_paint.cc @@ -653,7 +653,7 @@ static void rna_def_paint(BlenderRNA *brna) "the last used brush on file load"); prop = RNA_def_property(srna, "eraser_brush", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); RNA_def_property_struct_type(prop, "Brush"); RNA_def_property_pointer_funcs(prop, "rna_Paint_eraser_brush_get",