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