Add check for entries count.

This commit is contained in:
Chandler Cox
2024-09-06 20:30:20 -05:00
parent 6eee25e04a
commit fd30872f5e

View File

@@ -303,7 +303,8 @@ void Camera::GetMatrices(Matrix& view, Matrix& projection, const Viewport& viewp
void Camera::OnPreviewModelLoaded()
{
_previewModelBuffer.Setup(_previewModel.Get());
_previewModelBuffer.At(0).ReceiveDecals = false;
if (_previewModelBuffer.Count() > 0)
_previewModelBuffer.At(0).ReceiveDecals = false;
UpdateCache();
}