mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Don't destroy null-objects in UniqueHandle (Fixes #171).
This commit is contained in:
parent
c548ea4bf2
commit
05586ce4a2
@ -594,7 +594,7 @@ const std::string uniqueHandleHeader = R"(
|
||||
|
||||
~UniqueHandle()
|
||||
{
|
||||
this->destroy( m_value );
|
||||
if ( m_value ) this->destroy( m_value );
|
||||
}
|
||||
|
||||
UniqueHandle & operator=( UniqueHandle const& ) = delete;
|
||||
@ -645,7 +645,7 @@ const std::string uniqueHandleHeader = R"(
|
||||
{
|
||||
if ( m_value != value )
|
||||
{
|
||||
this->destroy( m_value );
|
||||
if ( m_value ) this->destroy( m_value );
|
||||
m_value = value;
|
||||
}
|
||||
}
|
||||
|
@ -351,7 +351,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
|
||||
~UniqueHandle()
|
||||
{
|
||||
this->destroy( m_value );
|
||||
if ( m_value ) this->destroy( m_value );
|
||||
}
|
||||
|
||||
UniqueHandle & operator=( UniqueHandle const& ) = delete;
|
||||
@ -402,7 +402,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
if ( m_value != value )
|
||||
{
|
||||
this->destroy( m_value );
|
||||
if ( m_value ) this->destroy( m_value );
|
||||
m_value = value;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user