git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53962
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxToolBarTool *tool2 = (wxToolBarTool*)node->GetData();
if ( tool2->IsControl() )
{
wxToolBarTool *tool2 = (wxToolBarTool*)node->GetData();
if ( tool2->IsControl() )
{
+ wxControl * const control = tool2->GetControl();
+
- wxControl *control = tool2->GetControl();
control->GetPosition(&x, NULL);
control->Move(x - width, wxDefaultCoord);
control->GetPosition(&x, NULL);
control->Move(x - width, wxDefaultCoord);
- wxStaticText* staticText = tool2->GetStaticText();
- staticText->Move(x - width, wxDefaultCoord);
+ wxStaticText * const staticText = tool2->GetStaticText();
+ if ( staticText )
+ staticText->Move(x - width, wxDefaultCoord);