gowin: set file descriptor to NULL to avoid segfault when no file a provided
This commit is contained in:
parent
db0bc008b1
commit
f7f13ad3a7
|
|
@ -66,6 +66,7 @@ using namespace std;
|
||||||
Gowin::Gowin(FtdiJtag *jtag, const string filename, bool flash_wr, bool sram_wr,
|
Gowin::Gowin(FtdiJtag *jtag, const string filename, bool flash_wr, bool sram_wr,
|
||||||
bool verbose): Device(jtag, filename, verbose)
|
bool verbose): Device(jtag, filename, verbose)
|
||||||
{
|
{
|
||||||
|
_fs = NULL;
|
||||||
if (_filename != "") {
|
if (_filename != "") {
|
||||||
if (_file_extension == "fs") {
|
if (_file_extension == "fs") {
|
||||||
if (flash_wr && sram_wr)
|
if (flash_wr && sram_wr)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue