From 593dd38514f6ba777c1eef1b065ca7e51e405c7b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 2 Mar 2026 21:37:23 +0100 Subject: Fix potential crash. --- src/subrip_reader.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subrip_reader.cc b/src/subrip_reader.cc index b95e6be..96526b8 100644 --- a/src/subrip_reader.cc +++ b/src/subrip_reader.cc @@ -301,7 +301,7 @@ SubripReader::convert_line(int line_number, string t, RawSubtitle& p) } else if (has_next(t, i, "")) { maybe_content (p); /* Maybe there were no colours, or this is an extra unmatched */ - if (!colours.empty()) { + if (colours.size() >= 2) { colours.pop_back(); p.colour = colours.back(); } -- cgit v1.2.3