Fix potential crash in ucs/clientlist.cpp

This commit is contained in:
Michael Cook (mackal) committed 2016-08-13 17:19:20 -04:00
1 parent 35c1eccbe1
commit fd1e425abc
1 file changed
+1 -1
+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;