From d0e6b59cd164110a54fa8cc2c95b6873f50e9605 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Mon, 28 Jun 2021 15:21:14 -0500 Subject: [PATCH] Cleanup: Replace paranoid check with assert Every call to `BKE_displist_make_curveTypes` already checks the object type beforehand, there is no need to check it again. Also removed an outdated comment. --- source/blender/blenkernel/intern/displist.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/source/blender/blenkernel/intern/displist.cc b/source/blender/blenkernel/intern/displist.cc index 6a57c5ad5a2..757c86681e0 100644 --- a/source/blender/blenkernel/intern/displist.cc +++ b/source/blender/blenkernel/intern/displist.cc @@ -1641,12 +1641,7 @@ void BKE_displist_make_curveTypes(Depsgraph *depsgraph, Object *ob, const bool for_render) { - /* The same check for duplis as in do_makeDispListCurveTypes. - * Happens when curve used for constraint/bevel was converted to mesh. - * check there is still needed for render displist and orco displists. */ - if (!ELEM(ob->type, OB_SURF, OB_CURVE, OB_FONT)) { - return; - } + BLI_assert(ELEM(ob->type, OB_SURF, OB_CURVE, OB_FONT)); BKE_object_free_derived_caches(ob);