Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debug/org.eclipse.cdt.debug.core/ChangeLog5
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java6
2 files changed, 8 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog
index 5b98ecf3d67..421c321bf3e 100644
--- a/debug/org.eclipse.cdt.debug.core/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.core/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-23 Mikhail Khodjaiants
+ Additional checks for the situation when the stack depth is not 0 and
+ the frame array is empty.
+ * CThread.java
+
2003-04-22 Mikhail Khodjaiants
Disconnect: terminate should be called from the disconnect event handler.
* CDebugTarget.java
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java
index 7464db74549..b87ed9c4385 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java
@@ -218,9 +218,9 @@ public class CThread extends CDebugElement
if ( depth != 0 )
{
// same number of frames - if top frames are in different
- // method, replace all frames
- ICDIStackFrame newTopFrame = frames[0];
- ICDIStackFrame oldTopFrame = ((CStackFrame)fStackFrames.get( 0 ) ).getLastCDIStackFrame();
+ // function, replace all frames
+ ICDIStackFrame newTopFrame = ( frames.length > 0 ) ? frames[0] : null;
+ ICDIStackFrame oldTopFrame = ( fStackFrames.size() > 0 ) ? ((CStackFrame)fStackFrames.get( 0 ) ).getLastCDIStackFrame() : null;
if ( !CStackFrame.equalFrame( newTopFrame, oldTopFrame ) )
{
disposeStackFrames( 0, fStackFrames.size() );

Back to the top