Skip to content

Commit

Permalink
Outline renderer null check for meshInstances (playcanvas#7360)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpal81xd authored Feb 18, 2025
1 parent 375ec79 commit 601baa4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extras/renderers/outline-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ class OutlineRenderer {

const renders = recursive ? entity.findComponents('render') : (entity.render ? [entity.render] : []);
renders.forEach((render) => {
if (render.entity.enabled && render.enabled) {
if (render.entity.enabled && render.enabled && render.meshInstances) {
meshInstances.push(...render.meshInstances);
}
});

const models = recursive ? entity.findComponents('model') : (entity.model ? [entity.model] : []);
models.forEach((model) => {
if (model.entity.enabled && model.enabled) {
if (model.entity.enabled && model.enabled && model.meshInstances) {
meshInstances.push(...model.meshInstances);
}
});
Expand Down

0 comments on commit 601baa4

Please sign in to comment.