Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3829741

Browse filesBrowse files
committed
Merge pull request #4624 from cgohlke/patch-2
Fix segfault on Windows
2 parents 14d8904 + 1357118 commit 3829741
Copy full SHA for 3829741

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed

‎src/_path_wrapper.cpp

Copy file name to clipboardExpand all lines: src/_path_wrapper.cpp
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,9 @@ static PyObject *Py_point_in_path_collection(PyObject *self, PyObject *args, PyO
355355

356356
npy_intp dims[] = {(npy_intp)result.size() };
357357
numpy::array_view<int, 1> pyresult(dims);
358-
memcpy(pyresult.data(), &result[0], result.size() * sizeof(int));
358+
if (result.size() > 0) {
359+
memcpy(pyresult.data(), &result[0], result.size() * sizeof(int));
360+
}
359361
return pyresult.pyobj();
360362
}
361363

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.