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:
authorJeroen Bakker <j.bakker@atmind.nl>2018-06-28 11:34:38 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-06-28 11:40:19 +0300
commit3f2bde5a398657b3a9965447ab34c4132acc8556 (patch)
treeac3300383d6c3a005862e7a442e4900fa93b1dfc
parentb01392e9ac338d8816e30d076577af7598c36a9e (diff)
Workbench: Materials Texture hash
only hash the texture if it exists. Really minor improvement
-rw-r--r--source/blender/draw/engines/workbench/workbench_materials.c5
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;
}