Fix: exception when intro video is missing
This commit is contained in:
1 parent
52f1b8f546
commit
ce4529325b
1 file changed
+17
-3
@@ -53,6 +53,10 @@ namespace Vocaluxe.Base
|
|||||||
{
|
{
|
||||||
_VideoTimer.Reset();
|
_VideoTimer.Reset();
|
||||||
_Finished = false;
|
_Finished = false;
|
||||||
|
if (_VideoStream == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
//CVideo.VdSkip(_VideoStream, 0f, 0f);
|
//CVideo.VdSkip(_VideoStream, 0f, 0f);
|
||||||
_VideoTimer.Start();
|
_VideoTimer.Start();
|
||||||
CVideo.Resume(_VideoStream);
|
CVideo.Resume(_VideoStream);
|
||||||
@@ -60,12 +64,19 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public void Pause()
|
public void Pause()
|
||||||
{
|
{
|
||||||
CVideo.Pause(_VideoStream);
|
if (_VideoStream != null)
|
||||||
|
{
|
||||||
|
CVideo.Pause(_VideoStream);
|
||||||
|
}
|
||||||
_VideoTimer.Stop();
|
_VideoTimer.Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Resume()
|
public void Resume()
|
||||||
{
|
{
|
||||||
|
if (_VideoStream == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
CVideo.Resume(_VideoStream);
|
CVideo.Resume(_VideoStream);
|
||||||
_VideoTimer.Start();
|
_VideoTimer.Start();
|
||||||
}
|
}
|
||||||
@@ -92,7 +103,7 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public void PreLoad()
|
public void PreLoad()
|
||||||
{
|
{
|
||||||
if (!_Loaded)
|
if (!_Loaded || _VideoStream == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -111,7 +122,10 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
CVideo.Close(ref _VideoStream);
|
if (_VideoStream != null)
|
||||||
|
{
|
||||||
|
CVideo.Close(ref _VideoStream);
|
||||||
|
}
|
||||||
_Loaded = false;
|
_Loaded = false;
|
||||||
_Finished = false;
|
_Finished = false;
|
||||||
_VideoTimer.Reset();
|
_VideoTimer.Reset();
|
||||||
|
|||||||
Reference in new issue
Block a user