mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-25 13:17:46 +00:00
Fix crash if shpk_name is null
This is common for the new Dawntrail models where I think this is failing on, and should at least prevent an easy crash.
This commit is contained in:
parent
e76a14fa6a
commit
756a37ecac
1 changed files with 1 additions and 1 deletions
|
@ -348,7 +348,7 @@ RenderMaterial MDLPart::createOrCacheMaterial(const physis_Material &mat)
|
|||
uint64_t MDLPart::getMaterialHash(const physis_Material &mat)
|
||||
{
|
||||
// TODO: this hash is terrible
|
||||
uint64_t hash = strlen(mat.shpk_name);
|
||||
uint64_t hash = mat.shpk_name ? strlen(mat.shpk_name) : 0;
|
||||
hash += mat.num_constants;
|
||||
hash += mat.num_samplers;
|
||||
hash += mat.num_shader_keys;
|
||||
|
|
Loading…
Add table
Reference in a new issue