fix(cpn): compilation breakage due to #7438 (#7544)

This commit is contained in:
philmoz
2026-07-11 20:17:04 +10:00
committed by GitHub
parent a0fcc8e069
commit 2eb090f66e
7 changed files with 17 additions and 16 deletions
+6 -3
View File
@@ -178,9 +178,12 @@ FirmwareInterface::FirmwareInterface(const QString &filename, QDialog *parent) :
if (filename.isEmpty()) return;
QFile file(filename);
file.open(QIODevice::ReadOnly);
initFlash(file.readAll());
file.close();
if (file.open(QIODevice::ReadOnly)) {
initFlash(file.readAll());
file.close();
} else {
// TODO: error handling
}
}
FirmwareInterface::FirmwareInterface(const QByteArray &flashData, QDialog *parent) :