Fix potential crash in ucs/clientlist.cpp

This commit is contained in:
Michael Cook (mackal)
2016-08-13 17:19:20 -04:00
parent 35c1eccbe1
commit fd1e425abc
+1 -1
View File
@@ -1985,7 +1985,7 @@ void Client::ChannelGrantVoice(std::string CommandString) {
return;
}
if(RequiredChannel->IsOwner(RequiredClient->GetName()) || RequiredChannel->IsModerator(RequiredClient->GetName())) {
if(RequiredClient && (RequiredChannel->IsOwner(RequiredClient->GetName()) || RequiredChannel->IsModerator(RequiredClient->GetName()))) {
GeneralChannelMessage("The channel owner and moderators automatically have voice.");
return;