Skip to content

Commit

Permalink
Fix parsing null async profiler segments (lucko#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
semenishchev authored and fonnymunkey committed May 6, 2024
1 parent 391b72a commit 121e604
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public long getValue() {

public static ProfileSegment parseSegment(JfrReader reader, JfrReader.Event sample, String threadName, long value) {
JfrReader.StackTrace stackTrace = reader.stackTraces.get(sample.stackTraceId);
int len = stackTrace.methods.length;
int len = stackTrace != null ? stackTrace.methods.length : 0;

AsyncStackTraceElement[] stack = new AsyncStackTraceElement[len];
for (int i = 0; i < len; i++) {
Expand Down

0 comments on commit 121e604

Please sign in to comment.