qgis_qgsrasterlayer_bug1040.patch
qgsrasterlayer.cpp (copie de travail) | ||
---|---|---|
421 | 421 | |
422 | 422 |
//check f this file has pyramids |
423 | 423 |
GDALRasterBandH myGDALBand = GDALGetRasterBand( mGdalDataset, 1 ); //just use the first band |
424 |
if (myGDALBand == NULL) |
|
425 |
{ |
|
426 |
// the dataset is probably a raster with subdatasets |
|
427 |
// It would be good to support subdatasets |
|
428 |
GDALDereferenceDataset(mGdalBaseDataset); |
|
429 |
mGdalBaseDataset = NULL; |
|
430 | ||
431 |
GDALClose(mGdalDataset); |
|
432 |
mGdalDataset = NULL; |
|
433 |
mValid = FALSE; |
|
434 |
return false; |
|
435 |
} |
|
424 | 436 |
if( GDALGetOverviewCount(myGDALBand) > 0 ) |
425 | 437 |
{ |
426 | 438 |
hasPyramidsFlag=true; |