Skip to content

Commit

Permalink
Fix problem with NULL pszDomain values.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.osgeo.org/gdal/trunk@5600 f0d54148-0727-0410-94bb-9a71ac55c965
  • Loading branch information
warmerdam committed Dec 10, 2003
1 parent 8ee7ffa commit 32b06f5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions frmts/vrt/vrtrasterband.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
******************************************************************************
*
* $Log$
* Revision 1.16 2003/12/10 15:44:42 warmerda
* Fix problem with NULL pszDomain values.
*
* Revision 1.15 2003/07/17 20:29:15 warmerda
* Moved all the sources implementations out.
* Improved error checking and returning when initializing from XML.
Expand Down Expand Up @@ -496,7 +499,7 @@ CPLXMLNode *VRTRasterBand::SerializeToXML()
char **VRTRasterBand::GetMetadata( const char *pszDomain )

{
if( EQUAL(pszDomain,"vrt_sources") )
if( pszDomain != NULL && EQUAL(pszDomain,"vrt_sources") )
{
char **papszSourceList = NULL;

Expand Down Expand Up @@ -534,8 +537,9 @@ char **VRTRasterBand::GetMetadata( const char *pszDomain )
CPLErr VRTRasterBand::SetMetadata( char **papszNewMD, const char *pszDomain )

{
if( EQUAL(pszDomain,"new_vrt_sources")
|| EQUAL(pszDomain,"vrt_sources") )
if( pszDomain != NULL
&& (EQUAL(pszDomain,"new_vrt_sources")
|| EQUAL(pszDomain,"vrt_sources")) )
{
VRTDriver *poDriver = (VRTDriver *) GDALGetDriverByName( "VRT" );
CPLErr eErr;
Expand Down

0 comments on commit 32b06f5

Please sign in to comment.