Don't put important code in an assert - fixes media player sample in runtime environment

This commit is contained in:
rdb 2015-08-28 21:40:08 +02:00
parent 838589ef0f
commit 9053999889

View File

@ -38,7 +38,8 @@ class MediaPlayer(ShowBase):
# but we want to make sure we get a MovieTexture, since it
# implements synchronizeTo.
self.tex = MovieTexture("name")
assert self.tex.read(media_file), "Failed to load video!"
success = self.tex.read(media_file)
assert success, "Failed to load video!"
# Set up a fullscreen card to set the video texture on.
cm = CardMaker("My Fullscreen Card")