mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[raster calculator] don't crash if output file has illegal size, e.g. 0x0
This commit is contained in:
parent
c09c301803
commit
f2273c6a11
@ -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 );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user