Skip to content

Commit

Permalink
FIX: address issue where PROJ core dumps on proj_create when global c…
Browse files Browse the repository at this point in the history
…ontext does not have data directory set (#419)
  • Loading branch information
snowman2 authored Aug 31, 2019
1 parent 172fada commit 9521dd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Change Log
~~~~~
* Added cleanup for internal PROJ errors (issue #413)
* Delay checking for pyproj data directory until importing pyproj (issue #415)
* Address issue where PROJ core dumps on proj_create with +init= when global context does not have data directory set (issue #415 & issue #368)

2.3.0
~~~~~
Expand Down
2 changes: 1 addition & 1 deletion pyproj/_datadir.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ cdef void pyproj_log_function(void *user_data, int level, const char *error_msg)
if level == PJ_LOG_ERROR:
ProjError.internal_proj_error = pystrdecode(error_msg)


cdef class ContextManager:
def __cinit__(self):
self.context = NULL
Expand Down Expand Up @@ -42,6 +41,7 @@ cdef class ContextManager:
for iii in range(len(data_dir_list)):
b_data_dir = cstrencode(data_dir_list[iii])
c_data_dir[iii] = b_data_dir
proj_context_set_search_paths(NULL, len(data_dir_list), c_data_dir)
proj_context_set_search_paths(self.context, len(data_dir_list), c_data_dir)
finally:
free(c_data_dir)
Expand Down

0 comments on commit 9521dd9

Please sign in to comment.