Skip to content

Commit

Permalink
Removing unneeded null pointer checks (#3649)
Browse files Browse the repository at this point in the history
  • Loading branch information
hbarker committed Apr 1, 2019
1 parent 193c01d commit 61be8b0
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 @@ -86,10 +86,8 @@ class JackAudioInit : public DeferInit {
}

void destroy() {
if (airJackAudio)
delete airJackAudio;
if (aorJackAudio)
delete aorJackAudio;
delete airJackAudio;
delete aorJackAudio;
if (jasys) {
jasys->close_jack();
delete jasys;
Expand Down
4 changes: 1 addition & 3 deletions src/murmur/MurmurGRPCImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,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 @@ -621,11 +621,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 61be8b0

Please sign in to comment.