Skip to content

Commit 807e52c

Browse files
committed
When an error is shown in the Backtrace screen, it prints the header
1 parent a9a2bcb commit 807e52c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

BacktraceScreen.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,22 +203,22 @@ static void BacktracePanel_populateFrames(BacktracePanel* this) {
203203
const Process* process = (Process*)Vector_get(this->processes, i);
204204
BacktracePanel_makeBacktrace(data, Process_getPid(process), &error);
205205

206+
BacktracePanelRow* header = BacktracePanelRow_new(this);
207+
header->process = process;
208+
header->type = BACKTRACE_PANEL_ROW_PROCESS_INFORMATION;
209+
Panel_add((Panel*)this, (Object*)header);
210+
206211
if (error) {
207212
BacktracePanelRow* errorRow = BacktracePanelRow_new(this);
208213
errorRow->type = BACKTRACE_PANEL_ROW_ERROR;
209214
errorRow->data.error = error;
210-
211-
Panel_prune((Panel*)this);
212215
Panel_add((Panel*)this, (Object*)errorRow);
216+
213217
Vector_delete(data);
218+
BacktracePanel_displayHeader(this);
214219
return;
215220
}
216221

217-
BacktracePanelRow* header = BacktracePanelRow_new(this);
218-
header->process = process;
219-
header->type = BACKTRACE_PANEL_ROW_PROCESS_INFORMATION;
220-
Panel_add((Panel*)this, (Object*)header);
221-
222222
for (int j = 0; j < Vector_size(data); j++) {
223223
BacktracePanelRow* row = BacktracePanelRow_new(this);
224224
row->type = BACKTRACE_PANEL_ROW_DATA_FRAME;

0 commit comments

Comments
 (0)