Skip to content

Commit

Permalink
Fix server crashes when .qgs file replaced (refs #12411)
Browse files Browse the repository at this point in the history
Cherry-picked from 232565d
  • Loading branch information
nyalldawson committed Jun 24, 2015
1 parent f5d4088 commit f659554
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/server/qgsconfigcache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,12 @@ QDomDocument* QgsConfigCache::xmlDocument( const QString& filePath )

void QgsConfigCache::removeChangedEntry( const QString& path )
{
mXmlDocumentCache.remove( path );
mWMSConfigCache.remove( path );
mWFSConfigCache.remove( path );
mWCSConfigCache.remove( path );

//xml document must be removed last, as other config cache destructors may require it
mXmlDocumentCache.remove( path );

mFileSystemWatcher.removePath( path );
}
2 changes: 1 addition & 1 deletion src/server/qgsserverprojectparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ QgsServerProjectParser::QgsServerProjectParser()

QgsServerProjectParser::~QgsServerProjectParser()
{
delete mXMLDoc;

}

void QgsServerProjectParser::projectLayerMap( QMap<QString, QgsMapLayer*>& layerMap ) const
Expand Down
2 changes: 1 addition & 1 deletion src/server/qgsserverprojectparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class QDomDocument;
class QgsServerProjectParser
{
public:
/**Takes ownership of the document*/

QgsServerProjectParser( QDomDocument* xmlDoc, const QString& filePath );
~QgsServerProjectParser();

Expand Down

0 comments on commit f659554

Please sign in to comment.