diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-28 11:34:38 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-28 11:40:19 +0300 |
commit | 3f2bde5a398657b3a9965447ab34c4132acc8556 (patch) | |
tree | ac3300383d6c3a005862e7a442e4900fa93b1dfc /source/blender/draw | |
parent | b01392e9ac338d8816e30d076577af7598c36a9e (diff) |
Workbench: Materials Texture hash
only hash the texture if it exists. Really minor improvement
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_materials.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c index 9fdafc87fa4..d7d1505b2d0 100644 --- a/source/blender/draw/engines/workbench/workbench_materials.c +++ b/source/blender/draw/engines/workbench/workbench_materials.c @@ -124,7 +124,10 @@ uint workbench_material_get_hash(WORKBENCH_MaterialData *material_template) result += BLI_ghashutil_uinthash_v4_murmur(input); /* add texture reference */ - result += BLI_ghashutil_inthash_p_murmur(material_template->ima); + if (material_template->ima) + { + result += BLI_ghashutil_inthash_p_murmur(material_template->ima); + } return result; } |