Skip to content

Commit

Permalink
NPE on INT/destroyed texture
Browse files Browse the repository at this point in the history
Here is NPE when one bound texture is INT, and another is destroyed.
  • Loading branch information
kr0n4ik committed Jun 22, 2023
1 parent 356abaa commit 92b39f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/textures/TextureSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export class TextureSystem implements ISystem
{
const glTexture = tex._glTextures[CONTEXT_UID];

if (glTexture.samplerType !== SAMPLER_TYPES.FLOAT)
if (!glTexture || glTexture.samplerType !== SAMPLER_TYPES.FLOAT)
{
this.renderer.texture.unbind(tex);
}
Expand Down

0 comments on commit 92b39f8

Please sign in to comment.