Skip to content

Commit fcc0dbf

Browse files
committed
Fix return code handling.
1 parent 9e3a3a5 commit fcc0dbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/gdal_viewshed.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ bool run(gdal::Options &localOpts, bool adjustCurveCoeff)
328328
bSuccess = oViewshed.run(
329329
hBand, localOpts.bQuiet ? GDALDummyProgress : GDALTermProgress);
330330
std::unique_ptr<GDALDataset> dstDs = oViewshed.output();
331-
bSuccess = (dstDs->Close() == CE_None);
331+
bSuccess = bSuccess && (dstDs->Close() == CE_None);
332332
}
333333
return bSuccess;
334334
}

0 commit comments

Comments
 (0)