提交 551056b2 authored 作者: Frederic's avatar Frederic

Fix segfault introduced in this PR.

上级 6b76c405
...@@ -351,7 +351,7 @@ static PyMemberDef CudaNdarray_members[] = ...@@ -351,7 +351,7 @@ static PyMemberDef CudaNdarray_members[] =
PyObject * CudaNdarray_CreateArrayObj(CudaNdarray * self, PyObject *args) PyObject * CudaNdarray_CreateArrayObj(CudaNdarray * self, PyObject *args)
{ {
PyObject * dtype = NULL; PyObject * dtype = NULL;
if (! PyArg_ParseTuple(args, "|O", &dtype)) if (args && !PyArg_ParseTuple(args, "|O", &dtype))
return NULL; return NULL;
if (dtype) { if (dtype) {
PyArray_Descr* dtype2; PyArray_Descr* dtype2;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论