Skip to content

Commit c74d501

Browse files
committed
fixed weird nullpoint w/@tsundberg
1 parent d875160 commit c74d501

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

java/org/approvaltests/ReporterFactory.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ private static <T extends Annotation> T getAnnotationFromStackTrace(Class<T> ann
7878
annotation = method.getAnnotation(annotationClass);
7979
}
8080
if (annotation != null) { return annotation; }
81-
annotation = clazz.getAnnotation(annotationClass);
81+
if (clazz != null)
82+
{
83+
annotation = clazz.getAnnotation(annotationClass);
84+
}
8285
if (annotation != null) { return annotation; }
8386
}
8487
return null;

0 commit comments

Comments
 (0)