LIBOMV-939: Gridproxy invalid cast exception on misformatted CAPS
Patch by Dahlia git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3603 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -1022,8 +1022,16 @@ namespace GridProxy
|
||||
{
|
||||
if (stage != CapsStage.Response) return false;
|
||||
|
||||
OSDMap map = (OSDMap)capReq.Response;
|
||||
OSDArray array = (OSDArray)map["events"];
|
||||
OSDMap map = null;
|
||||
if (capReq.Response is OSDMap)
|
||||
map = (OSDMap)capReq.Response;
|
||||
else return false;
|
||||
|
||||
OSDArray array = null;
|
||||
if (map.ContainsKey("events") && map["events"] is OSDArray)
|
||||
array = (OSDArray)map["events"];
|
||||
else
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < array.Count; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user