changeset 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 35ea82e24988
children c85d26cb9dab
files PyPlugScanner.cpp
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
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