Fix setup of embedded texture loading

This commit is contained in:
Kim Kulling
2021-08-28 13:33:25 +02:00
parent 4b1ff645e3
commit 3e090b21f5
3 changed files with 19 additions and 7 deletions

View File

@@ -325,9 +325,10 @@ int CMaterialManager::FindValidPath(aiString* p_szString)
// first check whether we can directly load the file
FILE* pFile = fopen(p_szString->data,"rb");
if (pFile)fclose(pFile);
else
{
if (pFile) {
fclose(pFile);
}
else {
// check whether we can use the directory of the asset as relative base
char szTemp[MAX_PATH*2], tmp2[MAX_PATH*2];
strcpy(szTemp, g_szFileName);