From 754e99239371ec4aa06a9728ae65028ac22c440c Mon Sep 17 00:00:00 2001 From: Ken Sharp Date: Wed, 6 Sep 2017 19:06:22 +0100 Subject: Coverity ID 94627 Guard the dereference of pdht with a NULL pointer test, to avoid a potential seg fault. --- base/gxdevndi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'base/gxdevndi.c') diff --git a/base/gxdevndi.c b/base/gxdevndi.c index 1b9bd1d7c..224d88fb9 100644 --- a/base/gxdevndi.c +++ b/base/gxdevndi.c @@ -144,7 +144,8 @@ gx_render_device_DeviceN(frac * pcolor, _color_set_c(pdevc, i, int_color[i], l_color[i]); gx_complete_halftone(pdevc, num_colors, pdht); - color_set_phase_mod(pdevc, ht_phase->x, ht_phase->y, + if (pdht) + color_set_phase_mod(pdevc, ht_phase->x, ht_phase->y, pdht->lcm_width, pdht->lcm_height); /* Determine if we are using only one component */ -- cgit v1.2.1