mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-13 07:49:01 +08:00
SPE-2679: Missing error code in fs::exists causes crash.
This commit is contained in:
parent
b9703147ad
commit
d593929494
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user