Skip to content

Commit 7a25ca2

Browse files
committed
Fixed crash due to error reporting
1 parent 2c8cf2e commit 7a25ca2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

engine/source/materials/customMaterial.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ bool CustomMaterial::preloadTextures(Vector<const char*>& errorBuffer)
8989
if (fallback != NULL)
9090
found = found && fallback->preloadTextures(errorBuffer);
9191

92-
bool foundVert = (!mShaderData->DXVertexShaderName || ResourceManager->find(mShaderData->getVertexShaderPath())); // Transfer shaders too lmao (attempt)
92+
bool foundVert = (mShaderData == NULL || !mShaderData->DXVertexShaderName || ResourceManager->find(mShaderData->getVertexShaderPath())); // Transfer shaders too lmao (attempt)
9393
if (!foundVert)
9494
{
9595
//dSprintf(errorBuffer, errorBufferSize, "%s\n Could not find vertex shader: %s", errorBuffer,
@@ -99,7 +99,7 @@ bool CustomMaterial::preloadTextures(Vector<const char*>& errorBuffer)
9999
}
100100
found = found && foundVert;
101101

102-
bool foundPixel = (!mShaderData->DXPixelShaderName || ResourceManager->find(mShaderData->getPixelShaderPath()));
102+
bool foundPixel = (mShaderData == NULL || !mShaderData->DXPixelShaderName || ResourceManager->find(mShaderData->getPixelShaderPath()));
103103
if (!foundPixel)
104104
{
105105
//dSprintf(errorBuffer, errorBufferSize, "%s\n Could not find pixel shader: %s", errorBuffer,

0 commit comments

Comments
 (0)