Fix crash.
authorCarl Hetherington <cth@carlh.net>
Fri, 2 May 2014 12:51:07 +0000 (13:51 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 2 May 2014 12:51:07 +0000 (13:51 +0100)
src/lib/subtitle_decoder.cc

index 92355ad62fed6f38a362960373716a918868dada..0f5a1992c46bad7d9e43d58bf4048a601a0bc0a3 100644 (file)
@@ -60,7 +60,7 @@ SubtitleDecoder::get (list<shared_ptr<T> > const & subs, ContentTime from, Conte
         *
         *  XXX: with subs being sparse, this may need more care...
         */
-       while (!pass() && (subs.front()->from() > from || to < subs.back()->to())) {}
+       while (!pass() && (subs.empty() || (subs.front()->from() > from || to < subs.back()->to()))) {}
 
        /* Now look for what we wanted in the data we have collected */
        /* XXX: inefficient */