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:
Dave Beazley 2000-02-03 18:01:31 +00:00
commit 3b43574d14

View file

@ -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;