Remove an unnecessary null check in CodeWindow.cpp.

The validity of ToolBar is checked at the beginning of the function
This commit is contained in:
Lioncash 2014-05-18 11:43:17 -04:00
parent 75cb8a7452
commit 554207a87c

View File

@ -611,7 +611,8 @@ void CCodeWindow::UpdateButtonStates()
wxAuiToolBar* ToolBar = GetToolBar();
// Toolbar
if (!ToolBar) return;
if (!ToolBar)
return;
if (!Initialized)
{
@ -633,8 +634,7 @@ void CCodeWindow::UpdateButtonStates()
}
ToolBar->EnableTool(IDM_STEP, Initialized && Stepping);
if (ToolBar) ToolBar->Realize();
ToolBar->Realize();
// Menu bar
// ------------------