Skip to content
Permalink
Browse files

Fix crash in server feature info due to storing incorrect reference t…

…o temporary

Seriously, auto is just plain dangerous and makes for fragile code.
Let's all just stop using it PLEASE?
  • Loading branch information
nyalldawson committed Jan 29, 2020
1 parent 6a78b5a commit b3f37fde9bc4785aebca29e6553d6c1de715f523
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/server/services/wms/qgswmsrenderer.cpp
@@ -1291,13 +1291,13 @@ namespace QgsWms
if ( ! mContext.parameters().queryLayersNickname().contains( queryLayer ) )
{
// Find which group this layer belongs to
const auto &constNicks { mContext.parameters().queryLayersNickname() };
for ( const auto &ql : constNicks )
const QStringList constNicks { mContext.parameters().queryLayersNickname() };
for ( const QString &ql : constNicks )
{
if ( mContext.layerGroups().contains( ql ) )
{
const auto &constLayers { mContext.layerGroups()[ql] };
for ( const auto &ml : constLayers )
const QList<QgsMapLayer *> constLayers { mContext.layerGroups()[ql] };
for ( const QgsMapLayer *ml : constLayers )
{
if ( ( ! ml->shortName().isEmpty() && ml->shortName() == queryLayer ) || ( ml->name() == queryLayer ) )
{

0 comments on commit b3f37fd

Please sign in to comment.
You can’t perform that action at this time.