diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2018-08-21 16:24:05 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2018-08-23 10:23:18 +0100 |
commit | b326a71659b7837d3acde954b18bda1a6f5e9498 (patch) | |
tree | 6f5c0f0da33c3f554e69dc1dffca1fb3f756e3d6 | |
parent | f25045e88de674a1202c1239565ee99e9ddabe91 (diff) |
Bug 699655: Properly check the return value....
...when getting a value from a dictionary
-rw-r--r-- | psi/zcolor.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/psi/zcolor.c b/psi/zcolor.c index 4c0f25827..e27baf988 100644 --- a/psi/zcolor.c +++ b/psi/zcolor.c | |||
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) | |||
283 | if (r_has_type(op, t_dictionary)) { | 283 | if (r_has_type(op, t_dictionary)) { |
284 | ref *pImpl, pPatInst; | 284 | ref *pImpl, pPatInst; |
285 | 285 | ||
286 | code = dict_find_string(op, "Implementation", &pImpl); | 286 | if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) |
287 | if (code != 0) { | 287 | return code; |
288 | if (code > 0) { | ||
288 | code = array_get(imemory, pImpl, 0, &pPatInst); | 289 | code = array_get(imemory, pImpl, 0, &pPatInst); |
289 | if (code < 0) | 290 | if (code < 0) |
290 | return code; | 291 | return code; |