[longomatch] Fix exception with early redraws
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix exception with early redraws
- Date: Tue, 28 Oct 2014 09:50:06 +0000 (UTC)
commit 1fe2c117ec4713092314e7b91e81e89163046679
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Tue Oct 21 12:42:17 2014 +0200
Fix exception with early redraws
.../CanvasObjects/PlayersTaggerObject.cs | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs
b/LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs
index 796d15e..37da65f 100644
--- a/LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs
@@ -335,11 +335,15 @@ namespace LongoMatch.Drawing.CanvasObjects
public override void ResetDrawArea ()
{
base.ResetDrawArea ();
- foreach (CanvasObject co in homePlayers) {
- co.ResetDrawArea ();
+ if (homePlayers != null) {
+ foreach (CanvasObject co in homePlayers) {
+ co.ResetDrawArea ();
+ }
}
- foreach (CanvasObject co in awayPlayers) {
- co.ResetDrawArea ();
+ if (awayPlayers != null) {
+ foreach (CanvasObject co in awayPlayers) {
+ co.ResetDrawArea ();
+ }
}
subPlayers.ResetDrawArea ();
subInjury.ResetDrawArea ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]