Skip to content

Commit

Permalink
Avoid crash in html item test
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Aug 8, 2012
1 parent 9a3d6ab commit ce84b56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/core/composer/qgscomposition.cpp
Expand Up @@ -463,8 +463,9 @@ void QgsComposition::addItemsFromXML( const QDomElement& elem, const QDomDocumen
for ( int i = 0; i < composerHtmlList.size(); ++i )
{
QDomElement currentHtmlElem = composerHtmlList.at( i ).toElement();
QgsComposerHtml* newHtml = new QgsComposerHtml( this, true );
QgsComposerHtml* newHtml = new QgsComposerHtml( this, false );
newHtml->readXML( currentHtmlElem, doc );
newHtml->setCreateUndoCommands( true );
this->addMultiFrame( newHtml );
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgscomposerhtml.cpp
Expand Up @@ -67,7 +67,7 @@ void TestQgsComposerHtml::table()
"control_images" + QDir::separator() + "expected_composerhtml" + QDir::separator() + "composerhtml_table.png" ) );
bool result = checker.testComposition();
mComposition->removeMultiFrame( htmlItem );
delete htmlItem;
//delete htmlItem;
QVERIFY( result );
}

Expand Down

0 comments on commit ce84b56

Please sign in to comment.