mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-30 01:48:50 +02:00
Only delete bitstream objects if non-null
This commit is contained in:
+4
-2
@@ -387,8 +387,10 @@ void Xilinx::program(unsigned int offset, bool unprotect_flash)
|
||||
}
|
||||
} catch (std::exception &e) {
|
||||
printError("FAIL");
|
||||
delete bit;
|
||||
delete secondary_bit;
|
||||
if (bit)
|
||||
delete bit;
|
||||
if (secondary_bit)
|
||||
delete secondary_bit;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user