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?

(cherry picked from commit b3f37fd)
  • Loading branch information
nyalldawson committed Jan 29, 2020
1 parent 014ea41 commit 82218832f48faa8e94b83fee28bd86ae2871a88b
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/server/services/wms/qgswmsrenderer.cpp
@@ -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 ) )
{

0 comments on commit 8221883

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