https://issues.qgis.org/https://issues.qgis.org/favicon.ico2013-11-06T06:05:18ZQGIS Issue TrackingQGIS Application - Bug report #9015: API: Using a QgsVectorLayer from an unusable uri crashes QGIShttps://issues.qgis.org/issues/9015?journal_id=461912013-11-06T06:05:18ZLuigi Pirelliluipir@gmail.com
<ul></ul><p>try to use isValid() call before to use the layer.</p>
<p><a class="external" href="http://www.qgis.org/api/classQgsDataProvider.html#a1f805f593a0fa0be58102e278114858b">http://www.qgis.org/api/classQgsDataProvider.html#a1f805f593a0fa0be58102e278114858b</a></p> QGIS Application - Bug report #9015: API: Using a QgsVectorLayer from an unusable uri crashes QGIShttps://issues.qgis.org/issues/9015?journal_id=461922013-11-06T06:24:21ZBernhard Ströblbernhard.stroebl@jena.de
<ul><li><strong>Resolution</strong> set to <i>invalid</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Hi Luigi,<br />and thanks for the tip. I was studying the api doc for QgsVectorLayer up and down. I quickly checked and realized that you can use almost anything (e.g. none existing shp file) to instatiate a QgsVectorLayer but it's data provider is not valid then either.</p>