SimpleInventory sanity checks for null before inventory dumping

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@523 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2006-11-07 21:35:02 +00:00
parent 7d7d4603b5
commit 5488eedd49

View File

@@ -122,7 +122,15 @@ namespace IA_SimpleInventory
Console.WriteLine("Dumping a copy of " + client.Self.FirstName + "'s inventory to the console.");
Console.WriteLine();
Console.WriteLine(AgentInventory.getRootFolder().toXML(false));
if (AgentInventory != null)
{
InventoryFolder root = AgentInventory.getRootFolder();
if (root != null)
{
Console.WriteLine(root.toXML(false));
}
}
}
}
}