Skip to content

Commit

Permalink
vlcrender: prevent crash on close
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Mar 10, 2016
1 parent 5fd8250 commit 7ca40d7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
10 changes: 10 additions & 0 deletions MainV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1561,6 +1561,16 @@ protected override void OnClosing(CancelEventArgs e)

Warnings.WarningEngine.Stop();

log.Info("closing vlcrender");
try
{
while (vlcrender.store.Count > 0)
vlcrender.store[0].Stop();
}
catch
{
}

log.Info("closing pluginthread");

pluginthreadrun = false;
Expand Down
1 change: 0 additions & 1 deletion MissionPlanner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3588,7 +3588,6 @@
<Content Include="DLLs\NumpyDotNet.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="ExtLibs\LibVLC.NET\LibVLC.NET.csproj" />
<Content Include="LogAnalyzer\DataflashLog.py">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down
2 changes: 1 addition & 1 deletion Utilities/vlcrender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace MissionPlanner.Utilities
{
public class vlcrender
{
static List<vlcrender> store = new List<vlcrender>();
internal static List<vlcrender> store = new List<vlcrender>();

LibVLCLibrary library;
IntPtr inst, mp, m;
Expand Down

0 comments on commit 7ca40d7

Please sign in to comment.