aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-08-09 13:16:41 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-08-09 13:16:41 +0000
commit935d27eb1a081ca49d5b17fc63bface95e404ac9 (patch)
tree0b24d17d57bc17ed56e90d09e1c94af8401c24e7 /Game/Code/Screens
parent962788be19c76ab74a36a9757eacd22f99297150 (diff)
downloadusdx-935d27eb1a081ca49d5b17fc63bface95e404ac9.tar.gz
usdx-935d27eb1a081ca49d5b17fc63bface95e404ac9.tar.xz
usdx-935d27eb1a081ca49d5b17fc63bface95e404ac9.zip
check if video was successfully opened. Otherwise a seek might be performed on an uninitialized video.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1250 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens')
-rw-r--r--Game/Code/Screens/UScreenSing.pas8
1 files changed, 5 insertions, 3 deletions
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index 6682a107..656471db 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -493,9 +493,11 @@ begin
fShowVisualization := false;
if (CurrentSong.Video <> '') and FileExists(CurrentSong.Path + CurrentSong.Video) then
begin
- fCurrentVideoPlaybackEngine.Open( CurrentSong.Path + CurrentSong.Video );
- fCurrentVideoPlaybackEngine.Position := CurrentSong.VideoGAP + CurrentSong.Start;
- CurrentSong.VideoLoaded := true;
+ if (fCurrentVideoPlaybackEngine.Open( CurrentSong.Path + CurrentSong.Video )) then
+ begin
+ fCurrentVideoPlaybackEngine.Position := CurrentSong.VideoGAP + CurrentSong.Start;
+ CurrentSong.VideoLoaded := true;
+ end;
end;
// set background