Commits

Ronald Oussoren committed 1605fe9

Whoops, forgot to increase reference count while storing a reference.

This causes a crash on GNUstep (found using valgrind)

Comments (0)

Files changed (1)

Modules/objc/super-call.m

 		methinfo = PyObjCMethodSignature_FromSignature(
 				PyObjCSelector_Signature(sel));
 		retval = PyObjCFFI_MakeClosure(methinfo, func, imp);
+		if (retval != NULL) {
+			Py_INCREF(imp);
+		}
 		PyObjCMethodSignature_Free(methinfo);
 		return retval;
 	} else {