[Javascript] Fix handling of functions which take void*

Fixes #682
This commit is contained in:
Olly Betts 2022-03-07 13:24:37 +13:00 committed by Olly Betts
commit 8dbcd710ff
5 changed files with 36 additions and 2 deletions

View file

@ -178,7 +178,7 @@ SWIGRUNTIME int SWIG_V8_ConvertInstancePtr(SWIGV8_OBJECT objRef, void **ptr, swi
if(cdata == NULL) {
return SWIG_ERROR;
}
if(cdata->info != info) {
if(info && cdata->info != info) {
swig_cast_info *tc = SWIG_TypeCheckStruct(cdata->info, info);
if (!tc && cdata->info->name) {
tc = SWIG_TypeCheck(cdata->info->name, info);