Don't try to invoke a null destructor function.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5732 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Matthias Köppe 2004-02-22 15:28:03 +00:00
commit 18aec6bdc8

View file

@ -256,7 +256,7 @@ free_swig(SCM A)
{
swig_type_info *type = (swig_type_info *) SCM_CELL_WORD_2(A);
if (type) {
if (type->clientdata)
if (type->clientdata && ((swig_guile_clientdata *)type->clientdata)->destroy)
((swig_guile_clientdata *)type->clientdata)->destroy(A);
}
return 0;