Skip to content

Commit dfef36e

Browse files
committedJul 12, 2016
[server] Fix crash in WMS server when... bad things happen
No idea what exactly the reason is, and it was only discovered by countless hours of printf-debugging. So I'm just pushing the fix for everyone else who might be affected.
1 parent ce974f5 commit dfef36e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/server/qgswmsprojectparser.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,6 +1146,11 @@ void QgsWMSProjectParser::addLayers( QDomDocument &doc,
11461146
}
11471147
}
11481148

1149+
if ( !ltGroup )
1150+
{
1151+
QgsDebugMsg( QString( "Skipping group %1, it could not be found" ).arg( name ) );
1152+
continue;
1153+
}
11491154
QString shortName = ltGroup->customProperty( "wmsShortName" ).toString();
11501155
QString title = ltGroup->customProperty( "wmsTitle" ).toString();
11511156

0 commit comments

Comments
 (0)
Please sign in to comment.