Skip to content

Commit

Permalink
Catch xml import error for composition
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Sep 28, 2012
1 parent 3a1c9ef commit f2f1426
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/composer/qgscomposition.cpp
Expand Up @@ -379,7 +379,13 @@ bool QgsComposition::loadFromTemplate( const QDomDocument& doc, QMap<QString, QS
{
xmlString = xmlString.replace( "[" + sIt.key() + "]", encodeStringForXML( sIt.value() ) );
}
importDoc.setContent( xmlString );

QString errorMsg;
int errorLine, errorColumn;
if ( !importDoc.setContent( xmlString, &errorMsg, &errorLine, &errorColumn ) )
{
return false;
}
}
else
{
Expand Down

0 comments on commit f2f1426

Please sign in to comment.