Skip to content

Commit

Permalink
Merge PR #3657: Remove unneeded null pointer checks
Browse files Browse the repository at this point in the history
  • Loading branch information
davidebeatrici committed Sep 25, 2019
2 parents 737fec3 + 615c72b commit 61c838a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions src/mumble/JackAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,8 @@ class JackAudioInit : public DeferInit {
}

void destroy() {
if (airJackAudio)
delete airJackAudio;
if (aorJackAudio)
delete aorJackAudio;
delete airJackAudio;
delete aorJackAudio;
if (jasys) {
delete jasys;
jasys = NULL;
Expand Down
4 changes: 1 addition & 3 deletions src/murmur/MurmurGRPCImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ void GRPCStart() {
}

void GRPCStop() {
if (service) {
delete service;
}
delete service;
}

MurmurRPCImpl::MurmurRPCImpl(const QString &address, std::shared_ptr<::grpc::ServerCredentials> credentials) {
Expand Down
8 changes: 3 additions & 5 deletions src/murmur/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,11 +637,9 @@ void Server::initBonjour() {
}

void Server::removeBonjour() {
if (bsRegistration) {
delete bsRegistration;
bsRegistration = NULL;
log("Stopped announcing server via bonjour");
}
delete bsRegistration;
bsRegistration = NULL;
log("Stopped announcing server via bonjour");
}
#endif

Expand Down

0 comments on commit 61c838a

Please sign in to comment.