Fixed [ 798205 ] Segfault in SWIG_ConvertPtr.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5046 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
175a8c21cf
commit
fb447a777a
1 changed files with 2 additions and 2 deletions
|
|
@ -275,7 +275,7 @@ cobject:
|
|||
|
||||
type_error:
|
||||
if (flags & SWIG_POINTER_EXCEPTION) {
|
||||
if (ty) {
|
||||
if (ty && c) {
|
||||
char *temp = (char *) malloc(64+strlen(ty->name)+strlen(c));
|
||||
sprintf(temp,"Type error. Got %s, expected %s", c, ty->name);
|
||||
PyErr_SetString(PyExc_TypeError, temp);
|
||||
|
|
@ -308,7 +308,7 @@ SWIG_ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int fla
|
|||
type_error:
|
||||
|
||||
if (flags) {
|
||||
if (ty) {
|
||||
if (ty && c) {
|
||||
char *temp = (char *) malloc(64+strlen(ty->name)+strlen(c));
|
||||
sprintf(temp,"Type error. Got %s, expected %s", c, ty->name);
|
||||
PyErr_SetString(PyExc_TypeError, temp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue