Skip to content

Commit 7b3e91a

Browse files
committed
Add support for checking band validity.
1 parent 5095676 commit 7b3e91a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gcore/gdal_priv.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,6 +2068,11 @@ class CPL_DLL GDALRasterBand : public GDALMajorObject
20682068

20692069
~GDALRasterBand() override;
20702070

2071+
bool IsValid() const
2072+
{
2073+
return static_cast<bool>(poDS);
2074+
}
2075+
20712076
int GetXSize() const;
20722077
int GetYSize() const;
20732078
int GetBand() const;

0 commit comments

Comments
 (0)