cache: ignore shifts beyond map size

Fixes crash
This commit is contained in:
itsmattkc
2021-07-18 11:05:33 -07:00
parent 52c5617159
commit 59e228439f
+4
View File
@@ -256,6 +256,10 @@ void FrameHashCache::ShiftEvent(const rational &from, const rational &to)
int64_t to_ts = ToTimestamp(to);
int64_t from_ts = ToTimestamp(from);
if (from_ts >= GetMapSize()) {
return;
}
if (diff_is_negative) {
// We're moving the frames starting at `from` backwards to where `to` is
if (to_ts < GetMapSize()) {