From 84713021edf688c9cf157562d34388583325aa45 Mon Sep 17 00:00:00 2001 From: "Alan D. Snow" Date: Wed, 19 Aug 2020 08:02:42 -0500 Subject: Clone projCppContext context when copying projCtx_t (#2324) --- src/ctx.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/ctx.cpp') diff --git a/src/ctx.cpp b/src/ctx.cpp index 1e97e58a..930ae9ea 100644 --- a/src/ctx.cpp +++ b/src/ctx.cpp @@ -24,6 +24,9 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#ifndef FROM_PROJ_CPP +#define FROM_PROJ_CPP +#endif #include #include @@ -34,6 +37,7 @@ #include "proj_experimental.h" #include "proj_internal.h" #include "filemanager.hpp" +#include "proj/internal/io_internal.hpp" /************************************************************************/ /* pj_get_ctx() */ @@ -152,6 +156,9 @@ projCtx_t::projCtx_t(const projCtx_t& other) file_finder_user_data = other.file_finder_user_data; networking = other.networking; ca_bundle_path = other.ca_bundle_path; + if (other.cpp_context != nullptr) { + cpp_context = other.cpp_context->clone(this); + } } /************************************************************************/ -- cgit v1.2.3