mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 06:00:41 +02:00
Merge pull request #3854 from neobrain/fix_default_delete
fextl: Properly handle nullptr arguments in fextl::default_delete
This commit is contained in:
1 file changed
+4
-2
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user