Fixed issues reported by Coverity.

This commit is contained in:
Maciej Suminski 2015-07-30 13:49:35 +02:00
parent fb29373b4c
commit 094c286024
3 changed files with 21 additions and 3 deletions

View File

@ -182,7 +182,15 @@ void CONTEXT_MENU::Clear()
void CONTEXT_MENU::UpdateAll()
{
m_update_handler();
try
{
m_update_handler();
}
catch( std::exception& e )
{
std::cerr << "CONTEXT_MENU error running update handler: " << e.what() << std::endl;
}
updateHotKeys();
runOnSubmenus( boost::bind( &CONTEXT_MENU::UpdateAll, _1 ) );

View File

@ -54,7 +54,17 @@ int PICKER_TOOL::Main( const TOOL_EVENT& aEvent )
m_picked = controls->GetCursorPosition();
if( m_clickHandler )
getNext = (*m_clickHandler)( *m_picked );
{
try
{
getNext = (*m_clickHandler)( *m_picked );
}
catch( std::exception& e )
{
std::cerr << "PICKER_TOOL click handler error: " << e.what() << std::endl;
break;
}
}
if( !getNext )
break;

View File

@ -136,7 +136,7 @@ bool SELECTION_CONDITIONS::sameNetFunc( const SELECTION& aSelection, bool aAllow
if( netcode == NETINFO_LIST::UNCONNECTED && !aAllowUnconnected )
return false;
}
else if( netcode != item->GetNetCode() )
else if( netcode != current_netcode )
{
return false;
}