diff --git a/Source/Modules/java.cxx b/Source/Modules/java.cxx index 5b861ee0f..987b6ddf6 100644 --- a/Source/Modules/java.cxx +++ b/Source/Modules/java.cxx @@ -2027,7 +2027,7 @@ public: Printf(dcast_wrap->code, " jobject jresult = (jobject) 0;\n"); Printf(dcast_wrap->code, " %s *obj = *((%s **)&jCPtrBase);\n", norm_name, norm_name); Printf(dcast_wrap->code, " if (obj) director = dynamic_cast(obj);\n"); - Printf(dcast_wrap->code, " if (director) jresult = director->swig_get_self);\n"); + Printf(dcast_wrap->code, " if (director) jresult = director->swig_get_self(jenv);\n"); Printf(dcast_wrap->code, " return jresult;\n"); Printf(dcast_wrap->code, "}\n");