Skip to content

Commit

Permalink
Fix crash on dispose
Browse files Browse the repository at this point in the history
  • Loading branch information
evilC committed Oct 15, 2017
1 parent 612f6c4 commit c9fc552
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion IProvider/IProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,10 @@ protected virtual void Dispose(bool disposing)
return;
if (disposing)
{
pollThread.Abort();
if (pollThread != null)
{
pollThread.Abort();
}
pollThreadRunning = false;
//Log("Stopped PollThread for {0}", ProviderName);
foreach (var stick in stickHandlers.Values)
Expand Down
3 changes: 3 additions & 0 deletions TestApp/TestApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,9 @@ public Tester()
};
//iow.SubscribeInput(titanOneSubReq);
#endregion

// Test disposal
//iow.Dispose();
}

void ToggleDefaultProfileState()
Expand Down

0 comments on commit c9fc552

Please sign in to comment.