forked from bartvdbraak/blender
Fix Cycles assert on exit after recent changes
This commit is contained in:
parent
888852055c
commit
a5c89574a3
@ -321,7 +321,7 @@ class CPUDevice : public Device {
|
||||
~CPUDevice()
|
||||
{
|
||||
#ifdef WITH_OSL
|
||||
delete osl_globals;
|
||||
util_aligned_delete(osl_globals);
|
||||
#endif
|
||||
task_pool.stop();
|
||||
texture_info.free();
|
||||
|
@ -37,6 +37,14 @@ template<typename T> T *util_aligned_new()
|
||||
return new (mem) T();
|
||||
}
|
||||
|
||||
template<typename T> void util_aligned_delete(T *t)
|
||||
{
|
||||
if (t) {
|
||||
t->~T();
|
||||
util_aligned_free(t);
|
||||
}
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
||||
#endif /* __UTIL_ALIGNED_MALLOC_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user