Skip to content

Commit

Permalink
fixed potential first class expection on textAtom attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed May 5, 2010
1 parent 9c337ff commit 3b4b75b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
Binary file modified SwfNet.suo
Binary file not shown.
5 changes: 3 additions & 2 deletions V2DRuntime/Display/Screen.cs
Expand Up @@ -143,8 +143,9 @@ public override void Initialize()
}

public override void Added(EventArgs e)
{
base.Added(e);
{
base.Added(e);

V2DGame.instance.SetSize(v2dWorld.Width, v2dWorld.Height);
Activate();
}
Expand Down
10 changes: 7 additions & 3 deletions V2DRuntime/Display/TextAtom.cs
Expand Up @@ -94,11 +94,15 @@ private float GetAttributeValue(string s, string attributeName)
string val;
try
{
val = GetAttributeValueString(s, attributeName);
result = float.Parse(val, NumberStyles.Any);
val = GetAttributeValueString(s, attributeName);
if (val != "")
{
result = float.Parse(val, NumberStyles.Any);
}
}
catch (Exception)
{
{
Console.WriteLine("Error with attribute. Name: " + attributeName + " String: " + s);
}

return result;
Expand Down
12 changes: 6 additions & 6 deletions VexTo2DPhysics/VexTree.cs
Expand Up @@ -892,12 +892,12 @@ private bool IsVex2DSymbol(IDefinition def)
{
for (int i = 0; i < ((Timeline)def).Instances.Count; i++)
{
IInstance inst = ((Timeline)def).Instances[i];
IDefinition def2 = curVo.Definitions[inst.DefinitionId];
result = def2 is Symbol ? IsVex2DSymbol(def2) : false;
if (result)
{
break;
IInstance inst = ((Timeline)def).Instances[i];
IDefinition def2 = curVo.Definitions[inst.DefinitionId];
result = def2 is Symbol ? IsVex2DSymbol(def2) : false;
if (result)
{
break;
}
}
}
Expand Down

0 comments on commit 3b4b75b

Please sign in to comment.