Skip to content

Commit

Permalink
+ fix crash when undoing creation of spreadsheet
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Dec 9, 2015
1 parent ae6b934 commit 69a6970
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/App/Document.cpp
Expand Up @@ -1903,11 +1903,13 @@ bool Document::_recomputeFeature(DocumentObject* Feat)
void Document::recomputeFeature(DocumentObject* Feat)
{
// delete recompute log
for( std::vector<App::DocumentObjectExecReturn*>::iterator it=_RecomputeLog.begin();it!=_RecomputeLog.end();++it)
for (std::vector<App::DocumentObjectExecReturn*>::iterator it=_RecomputeLog.begin();it!=_RecomputeLog.end();++it)
delete *it;
_RecomputeLog.clear();

_recomputeFeature(Feat);
// verify that the feature is (active) part of the document
if (Feat->getNameInDocument())
_recomputeFeature(Feat);
}

DocumentObject * Document::addObject(const char* sType, const char* pObjectName)
Expand All @@ -1928,7 +1930,7 @@ DocumentObject * Document::addObject(const char* sType, const char* pObjectName)
pcObject->setDocument(this);

// do no transactions if we do a rollback!
if(!d->rollback){
if (!d->rollback) {
// Transaction stuff
if (d->activeTransaction)
d->activeTransaction->addObjectNew(pcObject);
Expand Down

0 comments on commit 69a6970

Please sign in to comment.