From 7d9f741ceb6740275be57f39ab875b8846636a81 Mon Sep 17 00:00:00 2001
From: Matej Ferencevic <matej.ferencevic@memgraph.io>
Date: Tue, 5 May 2020 16:34:16 +0200
Subject: [PATCH] Add missing optional check to property store

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D2767
---
 src/storage/v2/property_store.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/storage/v2/property_store.cpp b/src/storage/v2/property_store.cpp
index 9ca5dfa24..4c08327af 100644
--- a/src/storage/v2/property_store.cpp
+++ b/src/storage/v2/property_store.cpp
@@ -390,6 +390,7 @@ std::optional<std::pair<Type, Size>> EncodePropertyValue(
     }
     case PropertyValue::Type::Double: {
       auto size = writer->WriteDouble(value.ValueDouble());
+      if (!size) return std::nullopt;
       return {{Type::DOUBLE, *size}};
     }
     case PropertyValue::Type::String: {