Skip to content

Commit

Permalink
Bail out when no overviews are needed
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianpls committed Nov 23, 2023
1 parent 13e8d6c commit 85cd0dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frmts/mrf/marfa_dataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@ CPLErr MRFDataset::IBuildOverviews(const char *pszResampling, int nOverviews,
// Initialize the empty overlays, all of them for a given scale
// They could already exist, in which case they are not erased
idxSize = AddOverviews(int(scale));

// If we don't have overviews, don't try to generate them
if (GetRasterBand(1)->GetOverviewCount() == 0)
throw CE_None;

if (!CheckFileSize(current.idxfname, idxSize, GA_Update))
{
CPLError(CE_Failure, CPLE_AppDefined,
Expand Down

0 comments on commit 85cd0dc

Please sign in to comment.