Skip to content

Commit

Permalink
Added check of viewID against size of implementation container.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertosfield committed Apr 16, 2024
1 parent 4395120 commit 909ebcc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/vsg/state/GraphicsPipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ namespace vsg
void compile(Context& context);

// remove the local reference to the Vulkan implementation
void release(uint32_t viewID) { _implementation[viewID] = {}; }
void release(uint32_t viewID)
{
if (viewID < static_cast<uint32_t>(_implementation.size())) _implementation[viewID] = {};
}
void release() { _implementation.clear(); }

protected:
Expand Down

0 comments on commit 909ebcc

Please sign in to comment.