diff --git a/src/integrators/misc/irrcache_proc.h b/src/integrators/misc/irrcache_proc.h index 34da29b0..74bdda59 100644 --- a/src/integrators/misc/irrcache_proc.h +++ b/src/integrators/misc/irrcache_proc.h @@ -35,7 +35,8 @@ public: IrradianceRecordVector() { } inline void put(const IrradianceCache::Record *rec) { - m_samples.push_back(new IrradianceCache::Record(rec)); + if (rec) + m_samples.push_back(new IrradianceCache::Record(rec)); } inline size_t size() const {