Fixed so that setting an index to a NULL object has no effect.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@189 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c2dc64db51
commit
3b43574d14
1 changed files with 1 additions and 0 deletions
|
|
@ -230,6 +230,7 @@ List_set(DOH *lo, int n, DOH *val) {
|
|||
List *l;
|
||||
int no = 0;
|
||||
l = (List *) lo;
|
||||
if (!val) return -1;
|
||||
if ((n < 0) || (n >= l->nitems)) {
|
||||
printf("List_set : Invalid list index %d\n", n);
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue