1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 12:03:16 +02:00

Bug 188421 - Fix exception caused when the number of stack frames returned doesn't match expected depth.

This commit is contained in:
Doug Schaefer 2007-05-22 18:45:10 +00:00
parent 97742ee6c8
commit 835ce9f909

View file

@ -165,6 +165,9 @@ public class CThread extends CDebugElement implements ICThread, IRestart, IResum
depth = getMaxStackDepth() - 1;
ICDIStackFrame[] frames = ( depth != 0 ) ? getCDIStackFrames( 0, depth - 1 ) : new ICDIStackFrame[0];
// Safety precaution in case getting the stack frames failed to get us as many as it said
depth = frames.length;
if ( fStackFrames.isEmpty() ) {
if ( frames.length > 0 ) {
addStackFrames( frames, 0, frames.length, false );