Skip to content

Commit dd9d7b1

Browse files
Daniel LangeDaniel Lange
authored andcommitted
Merge branch 'backtrace-nullptr' of Explorer09/htop-1
2 parents 25460fb + 9692f7f commit dd9d7b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Action.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,10 +618,10 @@ static Htop_Reaction actionBacktrace(State *st) {
618618
const Vector* allProcesses = st->mainPanel->super.items;
619619

620620
Vector* processes = Vector_new(Class(Process), false, VECTOR_DEFAULT_SIZE);
621-
if (!Process_isUserlandThread(selectedProcess)) {
621+
if (selectedProcess && !Process_isUserlandThread(selectedProcess)) {
622622
for (int i = 0; i < Vector_size(allProcesses); i++) {
623623
Process* process = (Process *)Vector_get(allProcesses, i);
624-
if (Process_getThreadGroup(process) == Process_getThreadGroup(selectedProcess)) {
624+
if (process && Process_getThreadGroup(process) == Process_getThreadGroup(selectedProcess)) {
625625
Vector_add(processes, process);
626626
}
627627
}

0 commit comments

Comments
 (0)