diff --git a/tiledb/sm/query/readers/sparse_global_order_reader.cc b/tiledb/sm/query/readers/sparse_global_order_reader.cc index 1b461dbd79f..dd82f29b0c7 100644 --- a/tiledb/sm/query/readers/sparse_global_order_reader.cc +++ b/tiledb/sm/query/readers/sparse_global_order_reader.cc @@ -108,6 +108,9 @@ struct PreprocessTileMergeFuture { public: std::optional await() { + if (!merge_.has_value()) { + return std::nullopt; + } auto ret = merge_.value()->await(); if (merge_.value()->finished()) { free_input();