diff --git a/src/lib/lwan-cache.c b/src/lib/lwan-cache.c index 3e1ce6152..4c07f6f66 100644 --- a/src/lib/lwan-cache.c +++ b/src/lib/lwan-cache.c @@ -199,7 +199,11 @@ struct cache_entry *cache_get_and_ref_entry_with_ctx(struct cache *cache, assert(cache); assert(error); - assert(key); +#ifndef NDEBUG + if (cache->key.copy != identity_key_copy) { + assert(key); + } +#endif *error = 0;