Skip to content

Commit ce84b56

Browse files
committedAug 8, 2012
Avoid crash in html item test
1 parent 9a3d6ab commit ce84b56

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎src/core/composer/qgscomposition.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,9 @@ void QgsComposition::addItemsFromXML( const QDomElement& elem, const QDomDocumen
463463
for ( int i = 0; i < composerHtmlList.size(); ++i )
464464
{
465465
QDomElement currentHtmlElem = composerHtmlList.at( i ).toElement();
466-
QgsComposerHtml* newHtml = new QgsComposerHtml( this, true );
466+
QgsComposerHtml* newHtml = new QgsComposerHtml( this, false );
467467
newHtml->readXML( currentHtmlElem, doc );
468+
newHtml->setCreateUndoCommands( true );
468469
this->addMultiFrame( newHtml );
469470
}
470471
}

‎tests/src/core/testqgscomposerhtml.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void TestQgsComposerHtml::table()
6767
"control_images" + QDir::separator() + "expected_composerhtml" + QDir::separator() + "composerhtml_table.png" ) );
6868
bool result = checker.testComposition();
6969
mComposition->removeMultiFrame( htmlItem );
70-
delete htmlItem;
70+
//delete htmlItem;
7171
QVERIFY( result );
7272
}
7373

0 commit comments

Comments
 (0)
Please sign in to comment.