diff --git a/source/function.cpp b/source/function.cpp index 203d25b..a66b2c1 100644 --- a/source/function.cpp +++ b/source/function.cpp @@ -318,7 +318,7 @@ std::pairfirst >= t) { output.first = map.end(); } - if (output.second->first <= t) { + if (output.second != map.end() && output.second->first <= t) { output.second = map.end(); } return output;