Skip to content

Commit

Permalink
Fix crash in server feature info due to storing incorrect reference t…
Browse files Browse the repository at this point in the history
…o temporary

Seriously, auto is just plain dangerous and makes for fragile code.
Let's all just stop using it PLEASE?

(cherry picked from commit b3f37fd)
  • Loading branch information
nyalldawson committed Feb 12, 2020
1 parent 014ea41 commit 8221883
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server/services/wms/qgswmsrenderer.cpp
Expand Up @@ -1262,13 +1262,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 ) )
{
Expand Down

0 comments on commit 8221883

Please sign in to comment.