Skip to content

Commit 9b87d9c

Browse files
committed
Make install-size optional
1 parent 67cf139 commit 9b87d9c

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

FlashpointManager/src/Common.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,10 @@ public Component(XmlNode node) : base(node)
6363

6464
// Size
6565

66-
long size;
66+
long size = 0;
67+
string stringSize = GetAttribute(node, "install-size", false);
6768

68-
if (long.TryParse(GetAttribute(node, "install-size", true), out size))
69-
{
70-
Size = size;
71-
}
72-
else
69+
if (stringSize != "" && !long.TryParse(stringSize, out size))
7370
{
7471
MessageBox.Show(
7572
"An error occurred while parsing the component list XML. Please alert Flashpoint staff ASAP!\n\n" +
@@ -80,6 +77,8 @@ public Component(XmlNode node) : base(node)
8077
Environment.Exit(1);
8178
}
8279

80+
Size = size;
81+
8382
// LastUpdated
8483

8584
long lastUpdated;

0 commit comments

Comments
 (0)