mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-22 14:26:51 +00:00
fextl: Properly handle nullptr arguments in fextl::default_delete
This reflects behavior of std::default_delete.
This commit is contained in:
parent
72d6c8ebd6
commit
470b435afd
@ -9,8 +9,10 @@ namespace fextl {
|
||||
template<class T>
|
||||
struct default_delete : public std::default_delete<T> {
|
||||
void operator()(T* ptr) const {
|
||||
std::destroy_at(ptr);
|
||||
FEXCore::Allocator::aligned_free(ptr);
|
||||
if (ptr) {
|
||||
std::destroy_at(ptr);
|
||||
FEXCore::Allocator::aligned_free(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
|
Loading…
x
Reference in New Issue
Block a user