From 88be8263312bc938a91147ad9d764e25ca412f6d Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Fri, 29 Nov 2013 15:30:07 +0100 Subject: [PATCH] fixed minor issue in AreaLight::toString() --- src/emitters/area.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/emitters/area.cpp b/src/emitters/area.cpp index e81a3c32..2d6462a7 100644 --- a/src/emitters/area.cpp +++ b/src/emitters/area.cpp @@ -210,8 +210,13 @@ public: oss << "AreaLight[" << endl << " radiance = " << m_radiance.toString() << "," << endl << " samplingWeight = " << m_samplingWeight << "," << endl - << " surfaceArea = " << m_shape->getSurfaceArea() << "," << endl - << " medium = " << indent(m_medium.toString()) << endl + << " surfaceArea = "; + if (m_shape) + oss << m_shape->getSurfaceArea(); + else + oss << ""; + oss << "," << endl + << " medium = " << indent(m_medium.toString()) << endl << "]"; return oss.str(); }