Skip to content

Commit

Permalink
Update src/core/qgsabstractgeopdfexporter.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
  • Loading branch information
nyalldawson and rouault committed Sep 18, 2024
1 parent e4aae13 commit 22036c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/qgsabstractgeopdfexporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ bool QgsAbstractGeoPdfExporter::finalize( const QList<ComponentLayerDetail> &com
gdal::dataset_unique_ptr outputDataset( GDALCreate( driver, destinationFile.toUtf8().constData(), 0, 0, 0, GDT_Unknown, papszOptions ) );

CPLPopErrorHandler();
const bool res = outputDataset.get();
// Keep explicit comparison to avoid confusing cppcheck
const bool res = outputDataset.get() != nullptr;
if ( !res )
{
if ( creationErrors.size() == 1 )
Expand Down

0 comments on commit 22036c1

Please sign in to comment.