From c26f9f536fdd54bfac37f9acb47b91d0b8811547 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Thu, 2 Dec 2010 22:32:16 +0100 Subject: [PATCH] crash bugfix for the irradiance cache --- src/integrators/misc/irrcache_proc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {