Prevent NULL pointer dereference

This commit is contained in:
Anton Kochkov 2021-01-18 17:47:29 +08:00 committed by Anton Kochkov
parent db1c1ca7db
commit b27c726b6d

View file

@ -355,9 +355,11 @@ static int string_scan_range(RzList *list, RzBinFile *bf, int min,
free (buf);
if (pj) {
pj_end (pj);
RzIO *io = bin->iob.io;
if (io) {
io->cb_printf ("%s", pj_string (pj));
if (bin) {
RzIO *io = bin->iob.io;
if (io) {
io->cb_printf ("%s", pj_string (pj));
}
}
pj_free (pj);
}