aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/AvatarService/AvatarService.cs
diff options
context:
space:
mode:
authorMelanie2010-10-30 02:25:25 +0100
committerMelanie2010-10-30 02:25:25 +0100
commitff7da2082d4d44b34c3ef312d5ec5e88c94931e1 (patch)
treeafd863eb3240e038bc10037cf4e2fc8a844fc1ea /OpenSim/Services/AvatarService/AvatarService.cs
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-ff7da2082d4d44b34c3ef312d5ec5e88c94931e1.zip
opensim-SC_OLD-ff7da2082d4d44b34c3ef312d5ec5e88c94931e1.tar.gz
opensim-SC_OLD-ff7da2082d4d44b34c3ef312d5ec5e88c94931e1.tar.bz2
opensim-SC_OLD-ff7da2082d4d44b34c3ef312d5ec5e88c94931e1.tar.xz
This commit fixes all the appearance related null refs. Still can't log in,
client displays a blank error box.
Diffstat (limited to 'OpenSim/Services/AvatarService/AvatarService.cs')
-rw-r--r--OpenSim/Services/AvatarService/AvatarService.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Services/AvatarService/AvatarService.cs b/OpenSim/Services/AvatarService/AvatarService.cs
index a8ad413..53ca7c8 100644
--- a/OpenSim/Services/AvatarService/AvatarService.cs
+++ b/OpenSim/Services/AvatarService/AvatarService.cs
@@ -51,8 +51,6 @@ namespace OpenSim.Services.AvatarService
51 m_log.Debug("[AVATAR SERVICE]: Starting avatar service"); 51 m_log.Debug("[AVATAR SERVICE]: Starting avatar service");
52 } 52 }
53 53
54 // Get|SetAppearance should preserve existing semantics
55 // until AvatarData can be removed completely
56 public AvatarAppearance GetAppearance(UUID principalID) 54 public AvatarAppearance GetAppearance(UUID principalID)
57 { 55 {
58 AvatarData avatar = GetAvatar(principalID); 56 AvatarData avatar = GetAvatar(principalID);
@@ -68,12 +66,15 @@ namespace OpenSim.Services.AvatarService
68 public AvatarData GetAvatar(UUID principalID) 66 public AvatarData GetAvatar(UUID principalID)
69 { 67 {
70 AvatarBaseData[] av = m_Database.Get("PrincipalID", principalID.ToString()); 68 AvatarBaseData[] av = m_Database.Get("PrincipalID", principalID.ToString());
71 if (av.Length == 0)
72 return null;
73
74 AvatarData ret = new AvatarData(); 69 AvatarData ret = new AvatarData();
75 ret.Data = new Dictionary<string,string>(); 70 ret.Data = new Dictionary<string,string>();
76 71
72 if (av.Length == 0)
73 {
74 ret.AvatarType = 1; // SL avatar
75 return ret;
76 }
77
77 foreach (AvatarBaseData b in av) 78 foreach (AvatarBaseData b in av)
78 { 79 {
79 if (b.Data["Name"] == "AvatarType") 80 if (b.Data["Name"] == "AvatarType")