[longomatch] Fix exceptions with empty shields
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix exceptions with empty shields
- Date: Mon, 7 Jul 2014 11:24:46 +0000 (UTC)
commit aa1126982aa8b77ff5e1413b8cfdad4aed81f397
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed May 28 17:06:09 2014 +0200
Fix exceptions with empty shields
LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs b/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
index 293dc1d..9c642de 100644
--- a/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
@@ -117,8 +117,10 @@ namespace LongoMatch.Gui.Panel
provider.Update (loadedTeam);
/* The shield might have changed, update it just in case */
- teamstreeview.Model.SetValue (itersDict[loadedTeam.Name], 0,
- loadedTeam.Shield.Value);
+ if (loadedTeam.Shield != null) {
+ teamstreeview.Model.SetValue (itersDict[loadedTeam.Name], 0,
+ loadedTeam.Shield.Value);
+ }
}
void LoadTeam (string teamName) {
@@ -218,7 +220,7 @@ namespace LongoMatch.Gui.Panel
team = TeamTemplate.DefaultTemplate (dialog.Count);
team.TeamName = dialog.Text;
team.Name = dialog.Text;
- provider.Save (team);
+ provider.Update (team);
}
Load (dialog.Text);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]