Cleanup: remove redundant checks which have already been tested

Note that these changes are limited simple cases as these kinds of
changes could allow for errors when refactoring code when the known
state is not so obvious.
This commit is contained in:
2021-06-10 01:55:44 +10:00
parent bda8887e0c
commit 4443c4082e
12 changed files with 28 additions and 37 deletions

View File

@@ -52,7 +52,7 @@ static blender::bke::cryptomatte::CryptomatteSessionPtr cryptomatte_init_from_no
BLI_assert(GS(scene->id.name) == ID_SCE);
if (use_meta_data) {
Render *render = (scene) ? RE_GetSceneRender(scene) : nullptr;
Render *render = RE_GetSceneRender(scene);
RenderResult *render_result = render ? RE_AcquireResultRead(render) : nullptr;
if (render_result) {
session = blender::bke::cryptomatte::CryptomatteSessionPtr(