Skip to content

Commit f986d74

Browse files
committed
[server][bugfix] Prevent potential crash
1 parent c7cde46 commit f986d74

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/server/qgshttprequesthandler.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ QgsHttpRequestHandler::QgsHttpRequestHandler( const bool captureOutput )
4343

4444
QgsHttpRequestHandler::~QgsHttpRequestHandler()
4545
{
46+
delete mException;
4647
}
4748

4849
void QgsHttpRequestHandler::setHttpResponse( QByteArray *ba, const QString &format )
@@ -455,7 +456,7 @@ void QgsHttpRequestHandler::setGetFeatureInfoResponse( const QDomDocument& infoD
455456

456457
void QgsHttpRequestHandler::setServiceException( QgsMapServiceException ex )
457458
{
458-
mException = &ex;
459+
mException = new QgsMapServiceException( ex );
459460
//create Exception DOM document
460461
QDomDocument exceptionDoc;
461462
QDomElement serviceExceptionReportElem = exceptionDoc.createElement( "ServiceExceptionReport" );

0 commit comments

Comments
 (0)