Skip to content

Commit 9521dd9

Browse files
authored
FIX: address issue where PROJ core dumps on proj_create when global context does not have data directory set (#419)
1 parent 172fada commit 9521dd9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/history.rst

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Change Log
55
~~~~~
66
* Added cleanup for internal PROJ errors (issue #413)
77
* Delay checking for pyproj data directory until importing pyproj (issue #415)
8+
* Address issue where PROJ core dumps on proj_create with +init= when global context does not have data directory set (issue #415 & issue #368)
89

910
2.3.0
1011
~~~~~

pyproj/_datadir.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ cdef void pyproj_log_function(void *user_data, int level, const char *error_msg)
1313
if level == PJ_LOG_ERROR:
1414
ProjError.internal_proj_error = pystrdecode(error_msg)
1515

16-
1716
cdef class ContextManager:
1817
def __cinit__(self):
1918
self.context = NULL
@@ -42,6 +41,7 @@ cdef class ContextManager:
4241
for iii in range(len(data_dir_list)):
4342
b_data_dir = cstrencode(data_dir_list[iii])
4443
c_data_dir[iii] = b_data_dir
44+
proj_context_set_search_paths(NULL, len(data_dir_list), c_data_dir)
4545
proj_context_set_search_paths(self.context, len(data_dir_list), c_data_dir)
4646
finally:
4747
free(c_data_dir)

0 commit comments

Comments
 (0)