private void KillIfEmpty()
{
if (this.m_Panes.Count == 0)
{
if (base.parent == null)
{
base.window.InternalCloseWindow();
}
else
{
SplitView parent = base.parent as SplitView;
ICleanuppable cleanuppable = base.parent as ICleanuppable;
parent.RemoveChildNice(this);
UnityEngine.Object.DestroyImmediate(this, true);
if (cleanuppable != null)
{
cleanuppable.Cleanup();
}
}
}
}