Only delete bitstream objects if non-null
This commit is contained in:
parent
beb93d8321
commit
090a16656d
|
|
@ -387,7 +387,9 @@ void Xilinx::program(unsigned int offset, bool unprotect_flash)
|
||||||
}
|
}
|
||||||
} catch (std::exception &e) {
|
} catch (std::exception &e) {
|
||||||
printError("FAIL");
|
printError("FAIL");
|
||||||
|
if (bit)
|
||||||
delete bit;
|
delete bit;
|
||||||
|
if (secondary_bit)
|
||||||
delete secondary_bit;
|
delete secondary_bit;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue