#799 resolves npe in alias hasBroadcastChannels() method (#802)

Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
Denny Sheirer
2020-05-07 08:30:07 +00:00
committed by GitHub
parent 2723926f83
commit 91cae70fa1

View File

@@ -618,12 +618,16 @@ public class Alias
for(AliasID id : getAliasIdentifiers()) for(AliasID id : getAliasIdentifiers())
{ {
if(id.getType() == AliasIDType.BROADCAST_CHANNEL && if(id instanceof BroadcastChannel)
((BroadcastChannel)id).getChannelName().contentEquals(channel)) {
BroadcastChannel broadcastChannel = (BroadcastChannel)id;
if(broadcastChannel.getChannelName() != null && broadcastChannel.getChannelName().contentEquals(channel))
{ {
return true; return true;
} }
} }
}
return false; return false;
} }