mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
Don't put important code in an assert - fixes media player sample in runtime environment
This commit is contained in:
parent
838589ef0f
commit
9053999889
@ -38,7 +38,8 @@ class MediaPlayer(ShowBase):
|
|||||||
# but we want to make sure we get a MovieTexture, since it
|
# but we want to make sure we get a MovieTexture, since it
|
||||||
# implements synchronizeTo.
|
# implements synchronizeTo.
|
||||||
self.tex = MovieTexture("name")
|
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.
|
# Set up a fullscreen card to set the video texture on.
|
||||||
cm = CardMaker("My Fullscreen Card")
|
cm = CardMaker("My Fullscreen Card")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user