aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.WinForms/Applications')
-rw-r--r--ShiftOS.WinForms/Applications/Pong.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/ShiftOS.WinForms/Applications/Pong.cs b/ShiftOS.WinForms/Applications/Pong.cs
index ae70aff..433e05f 100644
--- a/ShiftOS.WinForms/Applications/Pong.cs
+++ b/ShiftOS.WinForms/Applications/Pong.cs
@@ -981,6 +981,10 @@ namespace ShiftOS.WinForms.Applications
var hs = unite.GetPongHighscores();
foreach (var score in hs.Highscores)
{
+ if(this.ParentForm.Visible == false)
+ {
+ Thread.CurrentThread.Abort();
+ }
string username = unite.GetDisplayNameId(score.UserId);
this.Invoke(new Action(() =>
{
@@ -994,8 +998,15 @@ namespace ShiftOS.WinForms.Applications
}
catch
{
- Infobox.Show("Service unavailable.", "The Pong Highscore service is unavailable at this time.");
- this.Invoke(new Action(pnlgamestats.BringToFront));
+ try
+ {
+ if (this.ParentForm.Visible == true)
+ {
+ Infobox.Show("Service unavailable.", "The Pong Highscore service is unavailable at this time.");
+ this.Invoke(new Action(pnlgamestats.BringToFront));
+ }
+ }
+ catch { } //JUST. ABORT. THE. FUCKING. THREAD.
return;
}
});