mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 14:49:53 +08:00
Added nullptr check to unique_ptr destructor
This commit is contained in:
parent
c3a055ea75
commit
464cff6238
@ -1256,6 +1256,7 @@ namespace etl
|
||||
//*********************************
|
||||
unique_ptr(unique_ptr&& p_) ETL_NOEXCEPT
|
||||
: p(p_.release())
|
||||
, deleter(etl::move(p_.deleter))
|
||||
{
|
||||
}
|
||||
#endif
|
||||
@ -1281,7 +1282,10 @@ namespace etl
|
||||
//*********************************
|
||||
~unique_ptr()
|
||||
{
|
||||
deleter(p);
|
||||
if (p != ETL_NULLPTR)
|
||||
{
|
||||
deleter(p);
|
||||
}
|
||||
}
|
||||
|
||||
//*********************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user