Skip to content

Commit

Permalink
Quick fix to avoid accessing more frames than available [needs refact…
Browse files Browse the repository at this point in the history
…oring]

Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed May 13, 2018
1 parent 6bdb24a commit 94852f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tools/debugger/message/StackTraceResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public static StackTraceResponse create(final int startFrame, final int levels,

final boolean ignoreLast =
frames.get(frames.size() - 1).getRootNode() instanceof ExecutorRootNode;
final boolean ignore2ndToLast =
frames.get(frames.size() - 2).getRootNode() instanceof ReceivedRootNode;
final boolean ignore2ndToLast = frames.size() < 2 ? false
: frames.get(frames.size() - 2).getRootNode() instanceof ReceivedRootNode;

if (startFrame > skipFrames) {
skipFrames = startFrame;
Expand Down

0 comments on commit 94852f4

Please sign in to comment.