diff --git a/src/integrators/photonmapper/photonmapper.cpp b/src/integrators/photonmapper/photonmapper.cpp index 38e6ecc8..dc4e0d7e 100644 --- a/src/integrators/photonmapper/photonmapper.cpp +++ b/src/integrators/photonmapper/photonmapper.cpp @@ -207,7 +207,7 @@ public: bool hasDelta = false; for (size_t i=0; igetShapes().size(); ++i) { const BSDF *bsdf = scene->getShapes()[i]->getBSDF(); - if (bsdf->getType() & BSDF::EDelta) + if (bsdf && bsdf->getType() & BSDF::EDelta) hasDelta = true; }