Workbench: Materials Texture hash

only hash the texture if it exists. Really minor improvement
This commit is contained in:
Jeroen Bakker 2018-06-28 10:34:38 +02:00
parent b01392e9ac
commit 3f2bde5a39
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}