From d6775b536f4bf38d7ea6e7d8568d49f6b6714c47 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 2 Jan 2023 21:34:39 +0100 Subject: [PATCH] proj_clone(): avoid emitting errors on tranformations where some are not instanciable --- src/iso19111/c_api.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/iso19111/c_api.cpp b/src/iso19111/c_api.cpp index 7c835c15ab..2f408cb2c1 100644 --- a/src/iso19111/c_api.cpp +++ b/src/iso19111/c_api.cpp @@ -521,10 +521,13 @@ PJ *proj_clone(PJ_CONTEXT *ctx, const PJ *obj) { if (newPj) { newPj->descr = "Set of coordinate operations"; newPj->ctx = ctx; + const int old_debug_level = ctx->debug_level; + ctx->debug_level = PJ_LOG_NONE; for (const auto &altOp : obj->alternativeCoordinateOperations) { newPj->alternativeCoordinateOperations.emplace_back( PJCoordOperation(ctx, altOp)); } + ctx->debug_level = old_debug_level; } return newPj; }