Mercurial > hg > vampy
diff PyPlugScanner.cpp @ 115:a9e918adfff0
Skip directly over anything with null metatype - can happen with plugins whose init methods are not conformant (but that otherwise load OK as code)
author | Chris Cannam |
---|---|
date | Tue, 26 Feb 2019 14:31:08 +0000 |
parents | efff8e5d90a3 |
children | a38d318c85a9 |
line wrap: on
line diff
--- a/PyPlugScanner.cpp Tue Feb 26 14:30:16 2019 +0000 +++ b/PyPlugScanner.cpp Tue Feb 26 14:31:08 2019 +0000 @@ -212,6 +212,15 @@ PyTypeObject *metatype = Py_TYPE(item); + if (!metatype) { + cerr << "ERROR: plugin " << classname + << " reports null metatype for Vampy name \"" + << name << "\" (incomplete due to load error?)" + << endl; + acceptable = false; + break; + } + if (!strcmp(name, "frame2RealTime")) { if (metatype != &PyCFunction_Type) { cerr << "ERROR: plugin " << classname