Skip to content

Commit

Permalink
Fix build against Poppler master
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Sep 26, 2021
1 parent 0336b4c commit 9c09870
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gdal/frmts/pdf/pdfdataset.cpp
Expand Up @@ -5012,7 +5012,7 @@ PDFDataset *PDFDataset::Open( GDALOpenInfo * poOpenInfo )
#ifdef HAVE_POPPLER
if (bUseLib.test(PDFLIB_POPPLER))
{
GooString* poMetadata = poCatalogPoppler->readMetadata();
auto poMetadata = poCatalogPoppler->readMetadata();
if (poMetadata)
{
#if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72)
Expand All @@ -5026,7 +5026,9 @@ PDFDataset *PDFDataset::Open( GDALOpenInfo * poOpenInfo )
const char * const apszMDList[2] = { pszContent, nullptr };
poDS->SetMetadata(const_cast<char**>(apszMDList), "xml:XMP");
}
#if (POPPLER_MAJOR_VERSION < 21 || (POPPLER_MAJOR_VERSION == 21 && POPPLER_MINOR_VERSION <= 9))
delete poMetadata;
#endif
}

/* Read Info object */
Expand Down

0 comments on commit 9c09870

Please sign in to comment.