Check whether serial_serno is not NULL before calling it.
For devices connected through a real serial device rather than USB, there is no transport-layer serial number available. stk500v2.c (and jtag3.c) tried to always call this function. Closes #1254
This commit is contained in:
parent
b2c03f5d40
commit
06e999b8c5
1
NEWS
1
NEWS
|
@ -122,6 +122,7 @@ Changes since version 7.0:
|
||||||
- megaAVR JTAG programming doesn't work for SNAP and PICkit4
|
- megaAVR JTAG programming doesn't work for SNAP and PICkit4
|
||||||
#1052
|
#1052
|
||||||
- urclock/FTDI communication issues #1245
|
- urclock/FTDI communication issues #1245
|
||||||
|
- stk500v2.c dumps core on open #1254
|
||||||
|
|
||||||
* Pull requests:
|
* Pull requests:
|
||||||
|
|
||||||
|
|
|
@ -1570,6 +1570,7 @@ int jtag3_open_common(PROGRAMMER *pgm, const char *port) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get USB serial number
|
// Get USB serial number
|
||||||
|
if (serial_serno)
|
||||||
pgm->usbsn = serial_serno();
|
pgm->usbsn = serial_serno();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1579,6 +1579,7 @@ static int stk500v2_open(PROGRAMMER *pgm, const char *port) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get USB serial number
|
// Get USB serial number
|
||||||
|
if (serial_serno)
|
||||||
pgm->usbsn = serial_serno();
|
pgm->usbsn = serial_serno();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue