qgis/Quantum-GIS — pull request #64 by rouault (2011-11-20 22:10:34+00:00)
Title: OGR provider: don't segfault when the layer cannot be retrieved (e.g. datasource with 0 layer)

This commit checks that the layer retrieved by OGR_DS_GetLayer() or OGR_DS_GetLayerByName() are not NULL. NULL can happen is wrong layer name or index is provided. Or in the case of an empty datasource