summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/value.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/value.h b/src/value.h
index 361282c4..03d2550c 100644
--- a/src/value.h
+++ b/src/value.h
@@ -256,7 +256,7 @@ private:
*/
void _dup() {
VERIFY(storage);
- if (storage->refc > 1)
+ if (storage && storage->refc > 1)
storage = new storage_t(*storage.get());
}