aboutsummaryrefslogtreecommitdiff
path: root/src/range_set.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/range_set.cpp')
-rw-r--r--src/range_set.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/range_set.cpp b/src/range_set.cpp
index fd0076191b..9e621d2f13 100644
--- a/src/range_set.cpp
+++ b/src/range_set.cpp
@@ -40,6 +40,9 @@ void rangeset_sort(RangeSet *rs) {
}
bool rangeset_spans(RangeSet *rs, BigInt *first, BigInt *last) {
+ if (rs->src_range_list.length == 0)
+ return false;
+
rangeset_sort(rs);
const Range *first_range = &rs->src_range_list.at(0).range;