Vorspire
Knight
I've stumbled upon a couple of issues while developing my SuperGumps framework, an instance where I call Gump.Remove( GumpEntry) - I'm assuming it hasn't been found yet and only because it's never actually been used by anything yet, however I decided to report it in case anyone is having problems tracing it.
Gump.CS (Line 330~)
StackOverflowException:
Fix:
GumpEntry.cs (Line 90~)
NullReferenceException:
Fix:
Gump.CS (Line 330~)
StackOverflowException:
Code:
public void Remove( GumpEntry g )
{
Invalidate();
m_Entries.Remove(g);
g.Parent = null; //set accessor calls Gump.Remove( g )
}
Fix:
Code:
public void Remove( GumpEntry g )
{
if (g == null || !m_Entries.Contains(g))
{
return;
}
Invalidate();
m_Entries.Remove(g);
g.Parent = null;
}
GumpEntry.cs (Line 90~)
NullReferenceException:
Code:
if ( m_Parent != value )
{
if ( m_Parent != null )
{
m_Parent.Remove( this );
}
m_Parent = value;
m_Parent.Add( this ); //m_Parent may be null
}
Fix:
Code:
if (m_Parent == value)
{
return;
}
if (m_Parent != null)
{
m_Parent.Remove(this);
}
m_Parent = value;
if (m_Parent != null)
{
m_Parent.Add(this);
}