Skip to content

Commit

Permalink
Merge pull request #12781 from SergioRZMasson/bugfix/smooth-shading-n…
Browse files Browse the repository at this point in the history
…ative

Fix crash on smooth shading for meshes with no index buffers on Babylon Native.
  • Loading branch information
sebavan committed Jul 21, 2022
2 parents 09308b9 + a97b5ff commit 2579b8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dev/core/src/Engines/nativeEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ export class NativeEngine extends Engine {
const vertexBuffer = vertexBuffers[kind];
if (vertexBuffer) {
const buffer = vertexBuffer.getBuffer() as Nullable<NativeDataBuffer>;
if (buffer) {
if (buffer && buffer.nativeVertexBuffer) {
this._engine.recordVertexBuffer(
vertexArray,
buffer.nativeVertexBuffer!,
Expand Down

0 comments on commit 2579b8f

Please sign in to comment.