From 2c378a4f8cdae47804895bbdc0e231000a8e2933 Mon Sep 17 00:00:00 2001 From: jrheinlaender Date: Mon, 6 May 2013 20:42:53 +0430 Subject: [PATCH] Add check in Document.cpp recompute() to check for invalid pointers --- src/App/Document.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App/Document.cpp b/src/App/Document.cpp index 8238964c4..4bbd347b1 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -1755,7 +1755,7 @@ void Document::recompute() for (std::list::reverse_iterator i = make_order.rbegin();i != make_order.rend(); ++i) { DocumentObject* Cur = d->vertexMap[*i]; - if (!Cur) continue; + if (!Cur || !isIn(Cur)) continue; #ifdef FC_LOGFEATUREUPDATE std::clog << Cur->getNameInDocument() << " dep on:" ; #endif @@ -1820,7 +1820,7 @@ void Document::recompute() // reset all touched for (std::map::iterator it = d->vertexMap.begin(); it != d->vertexMap.end(); ++it) { - if (it->second) + if ((it->second) && isIn(it->second)) it->second->purgeTouched(); } d->vertexMap.clear();