From 7128daebba7032d3a63f50b7875643e9905f52ae Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Wed, 14 Jun 2023 01:49:59 +0800 Subject: [PATCH] cabana: fix core dump when failed to connect to panda (#28529) --- tools/cabana/cabana.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/cabana/cabana.cc b/tools/cabana/cabana.cc index 5dce53ba7d..d2c451be89 100644 --- a/tools/cabana/cabana.cc +++ b/tools/cabana/cabana.cc @@ -42,7 +42,12 @@ int main(int argc, char *argv[]) { if (cmd_parser.isSet("panda-serial")) { config.serial = cmd_parser.value("panda-serial"); } - stream = new PandaStream(&app, config); + try { + stream = new PandaStream(&app, config); + } catch (std::exception &e) { + qWarning() << e.what(); + return 0; + } } else { uint32_t replay_flags = REPLAY_FLAG_NONE; if (cmd_parser.isSet("ecam")) {