Fix exception when seeking with missing content.
authorCarl Hetherington <cth@carlh.net>
Sat, 8 Feb 2014 22:17:28 +0000 (22:17 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 8 Feb 2014 22:17:28 +0000 (22:17 +0000)
Reported-by: lukegb
ChangeLog
src/lib/player.cc

index 474c8f70d2630e509aa1d82a865c37e0197e33c2..17eca5cfa68940947476c66f27575a6fdd147d0a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2014-02-08  Carl Hetherington  <cth@carlh.net>
 
+       * Fix exception when seeking with missing content (part of #317).
+
        * Version 1.64.6 released.
 
 2014-02-08  Carl Hetherington  <cth@carlh.net>
index 42551889b03563f2dbea0f8e779ddbcddfdd767e..49d954c58e25745de35c33af359c09bc90121f85 100644 (file)
@@ -456,6 +456,10 @@ Player::setup_pieces ()
 
        for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {
 
+               if (!(*i)->paths_valid ()) {
+                       continue;
+               }
+
                shared_ptr<Piece> piece (new Piece (*i));
 
                /* XXX: into content? */