1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-12 08:14:26 +00:00

Firmware updater: Fix a race condition

avrdude: Handle OOM with configurable handler
This commit is contained in:
Vojtech Kral
2018-08-07 11:28:39 +02:00
committed by bubnikv
parent bd667aad6e
commit 60a0375ff9
14 changed files with 193 additions and 67 deletions
+4 -2
View File
@@ -551,8 +551,10 @@ void FirmwareDialog::priv::perform_upload()
// because the dialog ensures it doesn't exit before the background thread is done.
auto q = this->q;
this->avrdude = avrdude
.on_run([this]() {
avrdude
.on_run([this](AvrDude::Ptr avrdude) {
this->avrdude = std::move(avrdude);
try {
switch (this->hex_file.device) {
case HexFile::DEV_MK3: