summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2016-06-03 10:43:09 +0100
committerKen Sharp <ken.sharp@artifex.com>2016-06-03 10:43:09 +0100
commitcff9c80230086676a22c1c9f81457855bd8c69c5 (patch)
tree24a32907b41e5c35110688398600ce34060f702c
parentba73a9d5cf2dcdd84d74046288c9e056ce39f5df (diff)
downloadghostpdl-cff9c80230086676a22c1c9f81457855bd8c69c5.tar.gz
Coverity ID - 95084ce inside
Move a pointer derefeferene into a if clause checking for NULL
-rw-r--r--devices/gdevxcmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/devices/gdevxcmp.c b/devices/gdevxcmp.c
index 4bae3ab83..bd55f0e22 100644
--- a/devices/gdevxcmp.c
+++ b/devices/gdevxcmp.c
@@ -399,10 +399,10 @@ grayscale:
if (xdev->cman.std_cmap.map ||
(xdev->vinfo->class == StaticGray && alloc_std_cmap(xdev, false))
) {
- xdev->color_info.dither_grays =
- xdev->cman.std_cmap.map->red_max + 1;
- if (xdev->cman.std_cmap.map)
+ if (xdev->cman.std_cmap.map) {
+ xdev->color_info.dither_grays = xdev->cman.std_cmap.map->red_max + 1;
set_std_cmap(xdev, xdev->cman.std_cmap.map);
+ }
} else
#endif
/* Otherwise set up a gray ramp of our own */