mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-13 17:28:52 -04:00
Fixed potential NPE when checking for new SimpleComponent annotation.
This commit is contained in:
parent
92a3b8f93f
commit
0e485e17a3
@ -134,7 +134,8 @@ class ClassTransformer extends IClassTransformer {
|
||||
{
|
||||
val classNode = newClassNode(transformedClass)
|
||||
if (classNode.interfaces.contains("li/cil/oc/api/network/SimpleComponent") &&
|
||||
!classNode.visibleAnnotations.exists(_.desc == "Lli/cil/oc/api/network/SimpleComponent$SkipInjection;")) {
|
||||
(classNode.visibleAnnotations == null || !classNode.visibleAnnotations.
|
||||
exists(annotation => annotation != null && annotation.desc == "Lli/cil/oc/api/network/SimpleComponent$SkipInjection;"))) {
|
||||
try {
|
||||
transformedClass = injectEnvironmentImplementation(classNode)
|
||||
log.info(s"Successfully injected component logic into class $name.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user