Check for toolbar before checking tool
Not all toolbars exist in all tools at all times. Need to check before dereferencing variable. Fixes: lp:1754094 * https://bugs.launchpad.net/kicad/+bug/1754094
This commit is contained in:
parent
8fcbb64a46
commit
414e6614f1
|
@ -444,9 +444,9 @@ public:
|
|||
*/
|
||||
bool GetToolToggled( int aToolId )
|
||||
{
|
||||
return ( m_mainToolBar->GetToolToggled( aToolId ) ||
|
||||
m_optionsToolBar->GetToolToggled( aToolId ) ||
|
||||
m_drawToolBar->GetToolToggled( aToolId ) );
|
||||
return ( ( m_mainToolBar && m_mainToolBar->GetToolToggled( aToolId ) ) ||
|
||||
( m_optionsToolBar && m_optionsToolBar->GetToolToggled( aToolId ) ) ||
|
||||
( m_drawToolBar && m_drawToolBar->GetToolToggled( aToolId ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue