Skip to content

Commit

Permalink
addon/mg: Drop superfluous NULL pointer check
Browse files Browse the repository at this point in the history
update_all_button's value is obtained from operator new, which will
throw if the allocation fails, so it can never be NULL in subsequent
statements.

Found by coverity.
  • Loading branch information
irydacea committed Nov 19, 2014
1 parent 01c3d7c commit ed860bc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/addon/manager_ui.cpp
Expand Up @@ -797,9 +797,7 @@ void show_addons_manager_dialog(display& disp, addons_client& client, addons_lis
if(dummy_addons_list) {
filter_box->hide(true);
description_button->enable(false);
if(update_all_button) {
update_all_button->enable(false);
}
update_all_button->enable(false);
addons_list_menu->hide(true);
}

Expand Down

0 comments on commit ed860bc

Please sign in to comment.