Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unneeded null pointer checks #3657

Merged
merged 1 commit into from
Sep 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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