Commits

Darjus Loktevic  committed 4fea52c

Fix the fact that superclass can be null in makeProxy

  • Participants
  • Parent commits 98189c8

Comments (0)

Files changed (1)

File src/org/python/core/MakeProxies.java

         JavaMaker javaMaker = null;
         
         // check if a Jython annotation exists and if yes, the class is already a Jython Proxy
-        APIVersion apiVersion = superclass.getAnnotation(org.python.compiler.APIVersion.class);
-        if (apiVersion != null) {
-            // TODO validate versions, maybe use a different annotation
-            return superclass;
+        if (superclass != null) {
+        	APIVersion apiVersion = superclass.getAnnotation(org.python.compiler.APIVersion.class);
+        	if (apiVersion != null) {
+        		// TODO validate versions, maybe use a different annotation
+        		return superclass;
+        	}
         }
         
         Class<?>[] interfaces = vinterfaces.toArray(new Class<?>[vinterfaces.size()]);