Skip to content

Commit 3d3bee3

Browse files
committed
fix
1 parent 7e3ff64 commit 3d3bee3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/rdf4cpp/Literal.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,10 +1021,8 @@ Literal Literal::numeric_binop_impl(OpSelect op_select, Literal const &other, st
10211021
return Literal::make_typed_unchecked(std::move(*op_res.result_value), op_res.result_type_id, *result_entry, node_storage);
10221022
} else {
10231023
auto const *other_entry = DatatypeRegistry::get_entry(other_datatype);
1024-
assert(other_entry != nullptr);
1025-
1026-
if (!other_entry->numeric_ops.has_value()) {
1027-
return Literal{}; // not numeric
1024+
if (other_entry == nullptr || !other_entry->numeric_ops.has_value()) {
1025+
return Literal{}; // not registered, or not numeric
10281026
}
10291027

10301028
auto const equalizer = DatatypeRegistry::get_common_numeric_op_type_conversion(*this_entry,

0 commit comments

Comments
 (0)