Skip to content

Commit

Permalink
BUG: Only report DERIVED metadata domain if there is at least one ras…
Browse files Browse the repository at this point in the history
…ter band
  • Loading branch information
jmichel-otb committed Jul 8, 2016
1 parent f6aaf6d commit 8b7793e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdal/gcore/gdaldataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3346,7 +3346,7 @@ char ** GDALDataset::GetMetadataDomainList()
char ** currentDomainList = CSLDuplicate(oMDMD.GetDomainList());

// Ensure that we do not duplicate DERIVED domain
if(CSLFindString(currentDomainList,"DERIVED_SUBDATASETS")==-1)
if(GetRasterCount()>0 && CSLFindString(currentDomainList,"DERIVED_SUBDATASETS")==-1)
{
currentDomainList = CSLAddString(currentDomainList,"DERIVED_SUBDATASETS");
}
Expand Down

0 comments on commit 8b7793e

Please sign in to comment.