diff options
-rw-r--r-- | base/gsht.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/gsht.c b/base/gsht.c index bced3730d..df20e8432 100644 --- a/base/gsht.c +++ b/base/gsht.c @@ -985,7 +985,8 @@ gx_gstate_dev_ht_install( gx_ht_order * p_s_order = &p_s_comp->corder; int comp_num = p_s_comp->comp_number; - if (comp_num >= 0 && comp_num < GX_DEVICE_COLOR_MAX_COMPONENTS) { + if (comp_num >= 0 && comp_num < GX_DEVICE_COLOR_MAX_COMPONENTS && + comp_num < dht.num_comp) { gx_ht_order * p_d_order = &dht.components[comp_num].corder; /* indicate that this order has been filled in */ |