Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-01-04 06:02:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-01-04 09:38:11 +0300
commita5081896bc0416f9b64ae8e488bfe1cc2042ca7e (patch)
tree3d5a1c29a845adef18d05b623eeee5f9aacefae9 /source/blender/makesrna/intern/rna_object.c
parentb5c2a75d26dbd5725ee5c8f361db35aedb45efdf (diff)
Cleanup: redundant code, minor inconsistencies
- Remove ternary operators when both values are the same. - Remove break after return. - Remove redundant NULL checks for code which handles those cases immediately beforehand.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r--source/blender/makesrna/intern/rna_object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index f082b0096a5..e8f1c26d17f 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1045,7 +1045,7 @@ static void rna_Object_active_material_set(PointerRNA *ptr,
BLI_assert(BKE_id_is_in_global_main(value.data));
BKE_object_material_assign(G_MAIN, ob, value.data, ob->actcol, BKE_MAT_ASSIGN_EXISTING);
- if (ob && ob->type == OB_GPENCIL) {
+ if (ob->type == OB_GPENCIL) {
/* notifying material property in topbar */
WM_main_add_notifier(NC_SPACE | ND_SPACE_VIEW3D, NULL);
}