fix crash when repositioning tools without labels in DoDeleteTool() (ticket #9530)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -581,13 +581,15 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool)
 | 
			
		||||
        wxToolBarTool *tool2 = (wxToolBarTool*)node->GetData();
 | 
			
		||||
        if ( tool2->IsControl() )
 | 
			
		||||
        {
 | 
			
		||||
            wxControl * const control = tool2->GetControl();
 | 
			
		||||
 | 
			
		||||
            int x;
 | 
			
		||||
            wxControl *control = tool2->GetControl();
 | 
			
		||||
            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);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user