Don't destroy null-objects in UniqueHandle (Fixes #171).
This commit is contained in:
committed by
Markus Tavenrath
parent
c548ea4bf2
commit
05586ce4a2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user