Add evasion of low risk NPE in TypeSenderIdAbstract
This commit is contained in:
parent
8b9112c2da
commit
0f098dd31c
@ -110,16 +110,18 @@ public abstract class TypeSenderIdAbstract<T> extends TypeAbstract<T>
|
||||
// All of our subclasses return null if senderId is null.
|
||||
// Thus we don't need to check for that being null, but only check ret.
|
||||
|
||||
// If presence is online or local ...
|
||||
if (this.presence == SenderPresence.LOCAL || this.presence == SenderPresence.ONLINE)
|
||||
// If presence is online or local and the target is not visible for the sender then throw an error.
|
||||
if
|
||||
(
|
||||
(this.presence == SenderPresence.LOCAL || this.presence == SenderPresence.ONLINE)
|
||||
&&
|
||||
senderId != null
|
||||
&&
|
||||
!MixinVisibility.get().isVisible(senderId, sender)
|
||||
)
|
||||
{
|
||||
// ... and the target is not visible for the sender ...
|
||||
if (!MixinVisibility.get().isVisible(senderId, sender))
|
||||
{
|
||||
// .. throw an error.
|
||||
throwError(arg);
|
||||
}
|
||||
}
|
||||
|
||||
// Create & populate Ret
|
||||
T ret = this.getResultForSenderId(senderId);
|
||||
|
Loading…
Reference in New Issue
Block a user