add some npe checks
parent
d98e706e26
commit
0821d12685
|
@ -282,9 +282,16 @@ namespace OpenSim.Modules.EMail
|
||||||
Email lslMessage = new Email();
|
Email lslMessage = new Email();
|
||||||
|
|
||||||
lslMessage.time = DateTime.Now.ToShortTimeString();
|
lslMessage.time = DateTime.Now.ToShortTimeString();
|
||||||
lslMessage.message = messages[0].Mail.TextBody.ToString();
|
|
||||||
lslMessage.sender = messages[0].Mail.Sender.GetAddress(true);
|
if (messages[0].Mail.TextBody != null)
|
||||||
lslMessage.subject = messages[0].Mail.Subject;
|
lslMessage.message = messages[0].Mail.TextBody.ToString();
|
||||||
|
|
||||||
|
if(messages[0].Mail.Sender != null)
|
||||||
|
lslMessage.sender = messages[0].Mail.Sender.GetAddress(true);
|
||||||
|
|
||||||
|
if (messages[0].Mail.Subject != null)
|
||||||
|
lslMessage.subject = messages[0].Mail.Subject;
|
||||||
|
|
||||||
lslMessage.numLeft = messages.Count - 1;
|
lslMessage.numLeft = messages.Count - 1;
|
||||||
|
|
||||||
m_messages.Remove(messages[0]);
|
m_messages.Remove(messages[0]);
|
||||||
|
|
Loading…
Reference in New Issue