imageviewer: Fix potential null pointer dereference

(caught by clang-analyzer)

Change-Id: Ie24b7cd75c5e9814007674925f33b1a321f1d06d
This commit is contained in:
Solomon Peachy 2020-06-30 14:42:59 -04:00
parent 7fb438b06c
commit c1485455ea

View file

@ -282,6 +282,7 @@ void gif_decode(struct gif_decoder *d,
Row + j, Col, Width);
}
if (pf_progress != NULL)
pf_progress(25*(i+1), 100);
}
}
@ -299,7 +300,8 @@ void gif_decode(struct gif_decoder *d,
gif2pixels(Line, pixels_buffer[buf_idx],
Row + i, Col, Width);
pf_progress(100*(i+1)/Height, 100);
if (pf_progress != NULL)
pf_progress(25*(i+1), 100);
}
}