mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 06:55:53 +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) {
|
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;
|
return;
|
||||||
if (evt.GetInt() == 0) { // not at startup, show dialog
|
if (evt.GetInt() == 0) { // not at startup, show dialog
|
||||||
wxGetApp().open_wifi_config_dialog(false, evt.GetString());
|
wxGetApp().open_wifi_config_dialog(false, evt.GetString());
|
||||||
@ -852,7 +853,6 @@ void Plater::priv::init()
|
|||||||
wxGetApp().open_wifi_config_dialog(true, evt.GetString());
|
wxGetApp().open_wifi_config_dialog(true, evt.GetString());
|
||||||
return true;});
|
return true;});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Start the background thread and register this window as a target for update events.
|
// Start the background thread and register this window as a target for update events.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user