From a3bee2e42a4f2f0322b1ca67b9c3cd7c1914a13a Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Thu, 24 Jan 2019 17:03:24 -0800 Subject: [PATCH] Tiny order tweak. --- src/raw/RawModel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/raw/RawModel.cpp b/src/raw/RawModel.cpp index 2c8b4d1..38b5fc7 100644 --- a/src/raw/RawModel.cpp +++ b/src/raw/RawModel.cpp @@ -101,8 +101,9 @@ int RawModel::AddTexture( } for (size_t i = 0; i < textures.size(); i++) { // we allocate the struct even if the implementing image file is missing - if (StringUtils::CompareNoCase(textures[i].fileLocation, fileLocation) == 0 && - StringUtils::CompareNoCase(textures[i].name, name) == 0 && textures[i].usage == usage) { + if (textures[i].usage == usage && + StringUtils::CompareNoCase(textures[i].fileLocation, fileLocation) == 0 && + StringUtils::CompareNoCase(textures[i].name, name) == 0) { return (int)i; } }