From 15969538de7f59585879fbba555dec214d58bb74 Mon Sep 17 00:00:00 2001 From: Sander Speetjens Date: Wed, 23 Apr 2025 10:51:57 +0200 Subject: [PATCH] b library fix unload lib on error --- client/mainwindow.cpp | 1 + server/simulators.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/client/mainwindow.cpp b/client/mainwindow.cpp index f3dfaaa..d532dbd 100644 --- a/client/mainwindow.cpp +++ b/client/mainwindow.cpp @@ -19,6 +19,7 @@ MainWindow::MainWindow(QUrl ws_url, QWidget *parent) if (loaded_ui == nullptr) { SPDLOG_INFO("{} NOT FOUND", lib.fileName().toStdString()); + lib.unload(); continue; } auto widget = loaded_ui(m_web_socket.get(), this); diff --git a/server/simulators.cpp b/server/simulators.cpp index 466fde6..5dc5455 100644 --- a/server/simulators.cpp +++ b/server/simulators.cpp @@ -43,6 +43,7 @@ Simulators::Simulators(uint16_t port, QString can_dev, QString uart_dev, QObject if (loaded_sim == nullptr) { SPDLOG_INFO("{} NOT FOUND", lib.fileName().toStdString()); + lib.unload(); continue; } auto widget = loaded_sim(&m_com, this);