[fix] NULL check
This commit is contained in:
@@ -136,11 +136,11 @@ exit_destroy_label_ids:
|
|||||||
free(sorted_keys);
|
free(sorted_keys);
|
||||||
kh_destroy(str_uint32, label_ids);
|
kh_destroy(str_uint32, label_ids);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sparse_matrix_t *feature_matrix(trie_t *feature_ids, feature_count_array *feature_counts) {
|
sparse_matrix_t *feature_matrix(trie_t *feature_ids, feature_count_array *feature_counts) {
|
||||||
|
if (feature_ids == NULL || feature_counts == NULL) return NULL;
|
||||||
|
|
||||||
const char *feature;
|
const char *feature;
|
||||||
uint32_t feature_id;
|
uint32_t feature_id;
|
||||||
double count;
|
double count;
|
||||||
|
|||||||
Reference in New Issue
Block a user