Skip to content

Commit

Permalink
fix error when output file is not created
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15577 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
brushtyler committed Mar 23, 2011
1 parent 251e170 commit ad84b08
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/plugins/GdalTools/tools/doContour.py
Expand Up @@ -80,6 +80,6 @@ def getOutputFileName(self):

def addLayerIntoCanvas(self, fileInfo):
vl = self.iface.addVectorLayer(fileInfo.filePath(), "contour", "ogr")
if vl.isValid():
if vl != None and vl.isValid():
if hasattr(self, 'lastEncoding'):
vl.setProviderEncoding(self.lastEncoding)
2 changes: 1 addition & 1 deletion python/plugins/GdalTools/tools/doPolygonize.py
Expand Up @@ -81,6 +81,6 @@ def getOutputFileName(self):

def addLayerIntoCanvas(self, fileInfo):
vl = self.iface.addVectorLayer(fileInfo.filePath(), fileInfo.baseName(), "ogr")
if vl.isValid():
if vl != None and vl.isValid():
if hasattr(self, 'lastEncoding'):
vl.setProviderEncoding(self.lastEncoding)
2 changes: 1 addition & 1 deletion python/plugins/GdalTools/tools/doTileIndex.py
Expand Up @@ -69,6 +69,6 @@ def getOutputFileName( self ):

def addLayerIntoCanvas( self, fileInfo ):
vl = self.iface.addVectorLayer( fileInfo.filePath(), fileInfo.baseName(), "ogr" )
if vl.isValid():
if vl != None and vl.isValid():
if hasattr( self, 'lastEncoding' ):
vl.setProviderEncoding( self.lastEncoding )

0 comments on commit ad84b08

Please sign in to comment.