Prevent crash when there is no subtitle after there having been one.
authorCarl Hetherington <cth@carlh.net>
Thu, 11 Jul 2013 10:06:41 +0000 (11:06 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 11 Jul 2013 10:06:41 +0000 (11:06 +0100)
src/lib/player.cc

index 58ba57bdcd2b25dde49a8d08fe6601f8923ac32a..467f92374e66fcdd332090b49550c2aafc87b524 100644 (file)
@@ -521,6 +521,11 @@ Player::update_subtitle ()
                return;
        }
 
+       if (!_in_subtitle.image) {
+               _out_subtitle.image.reset ();
+               return;
+       }
+
        shared_ptr<SubtitleContent> sc = dynamic_pointer_cast<SubtitleContent> (piece->content);
        assert (sc);