Merge pull request #2228 from tobbi/misc_coverity
Fix a couple of deref after NULL check in states_screens
This commit is contained in:
commit
7fbfad664a
@ -59,7 +59,8 @@ void OptionsScreenAudio::init()
|
||||
{
|
||||
Screen::init();
|
||||
RibbonWidget* ribbon = this->getWidget<RibbonWidget>("options_choice");
|
||||
if (ribbon != NULL) ribbon->select( "tab_audio", PLAYER_ID_GAME_MASTER );
|
||||
assert(ribbon != NULL);
|
||||
ribbon->select( "tab_audio", PLAYER_ID_GAME_MASTER );
|
||||
|
||||
ribbon->getRibbonChildren()[0].setTooltip( _("Graphics") );
|
||||
ribbon->getRibbonChildren()[2].setTooltip( _("User Interface") );
|
||||
|
@ -133,7 +133,8 @@ void OptionsScreenInput::init()
|
||||
{
|
||||
Screen::init();
|
||||
RibbonWidget* tabBar = this->getWidget<RibbonWidget>("options_choice");
|
||||
if (tabBar != NULL) tabBar->select( "tab_controls", PLAYER_ID_GAME_MASTER );
|
||||
assert(tabBar != NULL);
|
||||
tabBar->select( "tab_controls", PLAYER_ID_GAME_MASTER );
|
||||
|
||||
tabBar->getRibbonChildren()[0].setTooltip( _("Graphics") );
|
||||
tabBar->getRibbonChildren()[1].setTooltip( _("Audio") );
|
||||
|
@ -79,8 +79,8 @@ void OptionsScreenInput2::init()
|
||||
{
|
||||
Screen::init();
|
||||
RibbonWidget* tabBar = getWidget<RibbonWidget>("options_choice");
|
||||
if (tabBar != NULL) tabBar->select( "tab_controls",
|
||||
PLAYER_ID_GAME_MASTER );
|
||||
assert(tabBar != NULL);
|
||||
tabBar->select( "tab_controls", PLAYER_ID_GAME_MASTER );
|
||||
|
||||
tabBar->getRibbonChildren()[0].setTooltip( _("Graphics") );
|
||||
tabBar->getRibbonChildren()[1].setTooltip( _("Audio") );
|
||||
|
@ -112,7 +112,8 @@ void OptionsScreenUI::init()
|
||||
{
|
||||
Screen::init();
|
||||
RibbonWidget* ribbon = getWidget<RibbonWidget>("options_choice");
|
||||
if (ribbon != NULL) ribbon->select( "tab_ui", PLAYER_ID_GAME_MASTER );
|
||||
assert(ribbon != NULL);
|
||||
ribbon->select( "tab_ui", PLAYER_ID_GAME_MASTER );
|
||||
|
||||
ribbon->getRibbonChildren()[0].setTooltip( _("Graphics") );
|
||||
ribbon->getRibbonChildren()[1].setTooltip( _("Audio") );
|
||||
|
@ -159,7 +159,8 @@ void OptionsScreenVideo::init()
|
||||
{
|
||||
Screen::init();
|
||||
RibbonWidget* ribbon = getWidget<RibbonWidget>("options_choice");
|
||||
if (ribbon != NULL) ribbon->select( "tab_video", PLAYER_ID_GAME_MASTER );
|
||||
assert(ribbon != NULL);
|
||||
ribbon->select( "tab_video", PLAYER_ID_GAME_MASTER );
|
||||
|
||||
ribbon->getRibbonChildren()[1].setTooltip( _("Audio") );
|
||||
ribbon->getRibbonChildren()[2].setTooltip( _("User Interface") );
|
||||
|
@ -631,7 +631,8 @@ void BaseUserScreen::unloaded()
|
||||
void TabbedUserScreen::init()
|
||||
{
|
||||
RibbonWidget* tab_bar = getWidget<RibbonWidget>("options_choice");
|
||||
if (tab_bar) tab_bar->select("tab_players", PLAYER_ID_GAME_MASTER);
|
||||
assert(tab_bar != NULL);
|
||||
tab_bar->select("tab_players", PLAYER_ID_GAME_MASTER);
|
||||
tab_bar->getRibbonChildren()[0].setTooltip( _("Graphics") );
|
||||
tab_bar->getRibbonChildren()[1].setTooltip( _("Audio") );
|
||||
tab_bar->getRibbonChildren()[2].setTooltip( _("User Interface") );
|
||||
|
Loading…
Reference in New Issue
Block a user