summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/cache.c b/lib/cache.c
index 883aa51..42c0b5e 100644
--- a/lib/cache.c
+++ b/lib/cache.c
@@ -752,7 +752,8 @@ static int cache_include(struct nl_cache *cache, struct nl_object *obj,
* Handle them first.
*/
if (nl_object_update(old, obj) == 0) {
- cb(cache, old, NL_ACT_CHANGE, data);
+ if (cb)
+ cb(cache, old, NL_ACT_CHANGE, data);
nl_object_put(old);
return 0;
}