Skip to content

Invalid lock operation in texture for mip level. #8659

@AlexAPPi

Description

@AlexAPPi

If the levels property is not passed to the texture constructor, then when trying to lock a level via the lock method it always returns undefined. The problem is that the code checks only for null, but the actual issue is the absence of the level entry; instead, it should check for emptiness, i.e., !levels[options.level].

if (levels[options.level] === null) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions