Skip to content

Commit

Permalink
Fixed crash due to error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
HumanGamer committed Mar 30, 2024
1 parent 2c8cf2e commit 7a25ca2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engine/source/materials/customMaterial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ bool CustomMaterial::preloadTextures(Vector<const char*>& errorBuffer)
if (fallback != NULL)
found = found && fallback->preloadTextures(errorBuffer);

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

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

0 comments on commit 7a25ca2

Please sign in to comment.