From d5939294943037ff7e9fa8c7bdd7fa1d43bc9a88 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Mon, 10 Feb 2025 13:40:53 +0100 Subject: [PATCH] SPE-2679: Missing error code in fs::exists causes crash. --- src/slic3r/GUI/Plater.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 05c8caa8b9..4a77d30b60 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -838,7 +838,8 @@ void Plater::priv::init() }); this->q->Bind(EVT_REMOVABLE_DRIVE_ADDED, [this](wxCommandEvent& evt) { - if (!fs::exists(fs::path(evt.GetString().utf8_string()) / "prusa_printer_settings.ini")) + boost::system::error_code ec; + if (!fs::exists(fs::path(evt.GetString().utf8_string()) / "prusa_printer_settings.ini", ec) || ec) return; if (evt.GetInt() == 0) { // not at startup, show dialog wxGetApp().open_wifi_config_dialog(false, evt.GetString()); @@ -852,7 +853,6 @@ void Plater::priv::init() wxGetApp().open_wifi_config_dialog(true, evt.GetString()); return true;}); } - }); // Start the background thread and register this window as a target for update events.