Fix crash on fmv completion

This commit is contained in:
Paul Chote
2010-10-15 00:03:15 +13:00
parent 185ba80e99
commit 2a02df9411
3 changed files with 24 additions and 15 deletions

View File

@@ -31,6 +31,14 @@ namespace OpenRA.Widgets
public bool Paused { get { return paused; } }
readonly World world;
[ObjectCreator.UseCtor]
public VqaPlayerWidget( [ObjectCreator.Param] World world )
{
this.world = world;
}
public bool DrawOverlay = true;
public void Load(string filename)
{
@@ -148,7 +156,7 @@ namespace OpenRA.Widgets
Sound.StopVideo();
video.Reset();
videoSprite.sheet.Texture.SetData(video.FrameData);
OnComplete();
world.AddFrameEndTask(_ => OnComplete());
}
}
}