diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-15 13:48:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-15 13:48:35 +0300 |
commit | 4be4c06671551da62edf197df6e7ad8c89dc2fe0 (patch) | |
tree | 17592201ff98be5c4d6fbd69b9f8c102a168365e /source/blender/editors/interface/interface_templates.c | |
parent | 80edc0e972a2dde85509968832ce21f46d86ce58 (diff) |
Cleanup: redundant checks
In some cases moved the checks into asserts,
to ensure changes in the future don't cause
the checks to become necessary again.
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index ae50090d791..f11e3a1f5f0 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -591,11 +591,9 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event) DEG_relations_tag_update(bmain); } else { - if (id) { - Main *bmain = CTX_data_main(C); - id_single_user(C, id, &template_ui->ptr, template_ui->prop); - DEG_relations_tag_update(bmain); - } + Main *bmain = CTX_data_main(C); + id_single_user(C, id, &template_ui->ptr, template_ui->prop); + DEG_relations_tag_update(bmain); } } break; |