diff --git a/src/core/qgsmaplayermodel.cpp b/src/core/qgsmaplayermodel.cpp index 1ca4dc580938..76bd029c8901 100644 --- a/src/core/qgsmaplayermodel.cpp +++ b/src/core/qgsmaplayermodel.cpp @@ -154,7 +154,7 @@ void QgsMapLayerModel::removeLayers( const QStringList &layerIds ) void QgsMapLayerModel::addLayers( const QList &layers ) { - if ( layers.count( ) ) + if ( !layers.empty( ) ) { int offset = 0; if ( mAllowEmpty )