- res = zebra_sort_get_ord(zh, sk->u.sortAttributes,
- &sort_criteria[i].ord[ib],
- &sort_criteria[i].numerical[ib]);
+ if (zebra_sort_get_ord(zh, sk->u.sortAttributes,
+ &sort_criteria[i].ord[ib],
+ &sort_criteria[i].numerical[ib]) !=
+ ZEBRA_OK && sks->which != Z_SortKeySpec_null)
+ return ZEBRA_FAIL;