aboutsummaryrefslogtreecommitdiff
path: root/src/iso19111/factory.cpp
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2019-09-15 16:28:36 +0200
committerGitHub <noreply@github.com>2019-09-15 16:28:36 +0200
commit3c0a5f0c147556f3badbef940fe5e415ff6f5708 (patch)
treee7f1cbaa5c7c218b81431280d0b27d004a7f4192 /src/iso19111/factory.cpp
parent16ce294aa5246a94e07bad554b007dd8423e5780 (diff)
parent6832bab5bf2ab2f13265fad52456e9a17560b06f (diff)
downloadPROJ-3c0a5f0c147556f3badbef940fe5e415ff6f5708.tar.gz
PROJ-3c0a5f0c147556f3badbef940fe5e415ff6f5708.zip
Merge pull request #1614 from rouault/fixes_related_to_1597
Fixes related to #1597
Diffstat (limited to 'src/iso19111/factory.cpp')
-rw-r--r--src/iso19111/factory.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp
index 3ed69ae9..9ecc0906 100644
--- a/src/iso19111/factory.cpp
+++ b/src/iso19111/factory.cpp
@@ -1000,9 +1000,11 @@ bool DatabaseContext::lookForGridInfo(const std::string &projFilename,
if (d->pjCtxt() == nullptr) {
d->setPjCtxt(pj_get_default_ctx());
}
+ int errno_before = proj_context_errno(d->pjCtxt());
gridAvailable =
pj_find_file(d->pjCtxt(), projFilename.c_str(), &fullFilename[0],
fullFilename.size() - 1) != 0;
+ proj_context_errno_set(d->pjCtxt(), errno_before);
fullFilename.resize(strlen(fullFilename.c_str()));
auto res =