diff options
Diffstat (limited to 'src/core/objhash.c')
| -rw-r--r-- | src/core/objhash.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/objhash.c b/src/core/objhash.c index 94c42dcf..5ee5f5c7 100644 --- a/src/core/objhash.c +++ b/src/core/objhash.c @@ -145,7 +145,9 @@ nni_objhash_find(nni_objhash *oh, uint32_t id, void **valp) node = nni_objhash_find_node(oh, id); if ((node != NULL) && (node->on_val != NULL)) { - *valp = node->on_val; + if (valp != NULL) { + *valp = node->on_val; + } node->on_refcnt++; rv = 0; } else { |
