Added a specific NULL check to cdrom/cdrom_image_backend.c to please cppcheck.
This commit is contained in:
@@ -768,7 +768,7 @@ cdi_add_track(cd_img_t *cdi, track_t *cur, uint64_t *shift, uint64_t prestart, u
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* First track (track number must be 1). */
|
/* First track (track number must be 1). */
|
||||||
if (cdi->tracks_num == 0) {
|
if ((prev == NULL) || (cdi->tracks_num == 0)) {
|
||||||
/* I guess this makes sure the structure is not filled with invalid data. */
|
/* I guess this makes sure the structure is not filled with invalid data. */
|
||||||
if (cur->number != 1)
|
if (cur->number != 1)
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user