Skip to content
Permalink
Browse files

[raster calculator] don't crash if output file has illegal size, e.g.…

… 0x0
  • Loading branch information
alexbruy committed Jan 23, 2018
1 parent c09c301 commit f2273c6a11af7ec80356ce824dabc7d04d96a1f5
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/analysis/raster/qgsrastercalculator.cpp
@@ -112,6 +112,11 @@ int QgsRasterCalculator::processCalculation( QgsFeedback *feedback )
}

gdal::dataset_unique_ptr outputDataset( openOutputFile( outputDriver ) );
if ( !outputDataset )
{
return static_cast< int >( CreateOutputError );
}

GDALSetProjection( outputDataset.get(), mOutputCrs.toWkt().toLocal8Bit().data() );
GDALRasterBandH outputRasterBand = GDALGetRasterBand( outputDataset.get(), 1 );

0 comments on commit f2273c6

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