Skip to content

Commit

Permalink
Merge pull request #77 from Bojzen-I-Mitten/fixes/nullmaterial
Browse files Browse the repository at this point in the history
Fixed null-mat parameter
  • Loading branch information
morgan-cromell authored Oct 4, 2018
2 parents a2db9c5 + 4c66368 commit 55b6bd5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace thomas
void RenderSkinnedComponent::SetMaterial(int meshIndex, resource::Material* material) {
RenderComponent::SetMaterial(meshIndex, material);
uint32_t effectIndex;
if (material && material->GetShader()->GetPropertyIndex(graphics::THOMAS_MATRIX_SKIN_ARRAY_HASH, effectIndex)) {
if (!material || material->GetShader()->GetPropertyIndex(graphics::THOMAS_MATRIX_SKIN_ARRAY_HASH, effectIndex)) {
m_skinInfo->m_apply = thomas::resource::shaderproperty::ApplyEffectMatrixDynamicArray;
m_skinInfo->m_effect_id = graphics::THOMAS_MATRIX_SKIN_ARRAY_HASH;
LOG("Warning! Material applied to skinned render component does not use any bone information.");
Expand Down

0 comments on commit 55b6bd5

Please sign in to comment.