boardd: fix segfault when SIGINT with no pandas (#22914)

* boardd: fix segfault when SIGINT with no pandas

* remove if block

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
pull/22920/head
Willem Melching 2021-11-15 14:10:08 +01:00 committed by GitHub
parent e42bf919b2
commit 8e12b9ca76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -669,6 +669,11 @@ int main(int argc, char* argv[]) {
}
}
if (pandas.size() == 0) {
// do_exit was set while not connected to a panda
return 0;
}
peripheral_panda = pandas[0];
LOGW("connected to board");