Skip to content

Commit

Permalink
Fix for shared handles for pool deleter
Browse files Browse the repository at this point in the history
  • Loading branch information
Agrael1 committed Jul 22, 2024
1 parent 77f6a63 commit 5f79a12
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions snippets/SharedDestroy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ class PoolFreeShared
public:
void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
{
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
( parent.*m_destroy )( m_pool.get(), 1u, &handle, *m_dispatch );
if( m_destroy && m_dispatch && m_pool )
( parent.*m_destroy )( m_pool.get(), 1u, &handle, *m_dispatch );
}

private:
Expand Down
4 changes: 2 additions & 2 deletions vulkan/vulkan_shared.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ namespace VULKAN_HPP_NAMESPACE
public:
void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
{
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
( parent.*m_destroy )( m_pool.get(), 1u, &handle, *m_dispatch );
if ( m_destroy && m_dispatch && m_pool )
( parent.*m_destroy )( m_pool.get(), 1u, &handle, *m_dispatch );
}

private:
Expand Down
4 changes: 2 additions & 2 deletions vulkan/vulkansc_shared.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ namespace VULKAN_HPP_NAMESPACE
public:
void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
{
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
( parent.*m_destroy )( handle, m_allocationCallbacks, *m_dispatch );
if ( m_destroy && m_dispatch )
( parent.*m_destroy )( handle, m_allocationCallbacks, *m_dispatch );
}

private:
Expand Down

0 comments on commit 5f79a12

Please sign in to comment.