Fixed null pointer exception
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Fri, 9 Jun 2017 11:01:31 +0000 (14:01 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Fri, 9 Jun 2017 11:01:31 +0000 (14:01 +0300)
src/main/java/eu/svjatoslav/inspector/java/structure/MethodDescriptor.java

index d411cb0..efe6992 100755 (executable)
@@ -141,8 +141,9 @@ public class MethodDescriptor implements GraphElement,
     protected int getOutsideVisibleReferencesCount() {
         int result = 0;
 
-        if (returnType.isVisible())
-            result++;
+        if (returnType != null)
+            if (returnType.isVisible())
+                result++;
 
         for (final ClassDescriptor classDescriptor : argumentTypes)
             if (classDescriptor.isVisible())