summaryrefslogtreecommitdiff
path: root/src/compat/option.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compat/option.hpp')
-rw-r--r--src/compat/option.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compat/option.hpp b/src/compat/option.hpp
index 27ee0bc..1976589 100644
--- a/src/compat/option.hpp
+++ b/src/compat/option.hpp
@@ -171,7 +171,10 @@ namespace option
}
~Option()
{
- do_destruct();
+ if (repr.is_some())
+ {
+ do_destruct();
+ }
}
T move_or(T def)