diff --git a/src/integrators/mlt/mlt_proc.cpp b/src/integrators/mlt/mlt_proc.cpp index 7d820505..9cb5c320 100644 --- a/src/integrators/mlt/mlt_proc.cpp +++ b/src/integrators/mlt/mlt_proc.cpp @@ -189,7 +189,7 @@ public: fail = true; if (fail) Log(EError, "Detected an unexpected path modification outside of the " - "specifed range after a mutation of type %s (k=%i)!", + "specified range after a mutation of type %s (k=%i)!", muRec.toString().c_str(), current->length()); } backup.release(*m_pool); diff --git a/src/libbidir/manifold.cpp b/src/libbidir/manifold.cpp index f6fd5aa4..e32a4c45 100644 --- a/src/libbidir/manifold.cpp +++ b/src/libbidir/manifold.cpp @@ -387,7 +387,8 @@ bool SpecularManifold::computeTangents() { for (int i=0; i < n - 1; ++i) { m_vertices[i].u = Li * m_vertices[i].c; - if (!(m_vertices[i+1].b - m_vertices[i+1].a * m_vertices[i].u).invert(Li)) + Matrix2x2 temp = m_vertices[i+1].b - m_vertices[i+1].a * m_vertices[i].u; + if (!temp.invert(Li)) return false; } diff --git a/src/libbidir/mut_bidir.cpp b/src/libbidir/mut_bidir.cpp index abdc6daf..a3befd3a 100644 --- a/src/libbidir/mut_bidir.cpp +++ b/src/libbidir/mut_bidir.cpp @@ -260,7 +260,7 @@ Float BidirectionalMutator::Q(const Path &source, const Path &proposal, Float luminance = weight.getLuminance(); - if (luminance <= 0) { + if (luminance <= 0 || !std::isfinite(luminance)) { Log(EWarn, "Internal error: luminance = %f!", luminance); continue; }