提交 451d36e0 编写于 作者: I isidor

callstack fix npe

上级 f128273f
......@@ -73,8 +73,8 @@ export class CallStackView extends ViewletPanel {
// Only show the global pause message if we do not display threads.
// Otherwise there will be a pause message per thread and there is no need for a global one.
const sessions = this.debugService.getModel().getSessions();
if (sessions.length === 1 && sessions[0].getAllThreads().length === 1) {
const thread = sessions[0].getAllThreads()[0];
const thread = sessions.length === 1 && sessions[0].getAllThreads().length === 1 ? sessions[0].getAllThreads()[0] : undefined;
if (thread && thread.stoppedDetails) {
this.pauseMessageLabel.textContent = thread.stoppedDetails.description || nls.localize('debugStopped', "Paused on {0}", thread.stoppedDetails.reason);
this.pauseMessageLabel.title = thread.stoppedDetails.text;
dom.toggleClass(this.pauseMessageLabel, 'exception', thread.stoppedDetails.reason === 'exception');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册