[server][bugfix] Prevent potential crash

This commit is contained in:
elpaso 2016-02-23 10:07:09 +01:00
parent c7cde461b2
commit f986d74cb8

View File

@ -43,6 +43,7 @@ QgsHttpRequestHandler::QgsHttpRequestHandler( const bool captureOutput )
QgsHttpRequestHandler::~QgsHttpRequestHandler()
{
delete mException;
}
void QgsHttpRequestHandler::setHttpResponse( QByteArray *ba, const QString &format )
@ -455,7 +456,7 @@ void QgsHttpRequestHandler::setGetFeatureInfoResponse( const QDomDocument& infoD
void QgsHttpRequestHandler::setServiceException( QgsMapServiceException ex )
{
mException = &ex;
mException = new QgsMapServiceException( ex );
//create Exception DOM document
QDomDocument exceptionDoc;
QDomElement serviceExceptionReportElem = exceptionDoc.createElement( "ServiceExceptionReport" );