Fix a memleak in COLOR_SWATCH

This commit is contained in:
Maciej Suminski 2017-03-10 17:56:41 +01:00
parent 8c3b8ee693
commit f46961d003
1 changed files with 3 additions and 3 deletions

View File

@ -152,11 +152,11 @@ void COLOR_SWATCH::GetNewSwatchColor()
{ {
wxColourData colourData; wxColourData colourData;
colourData.SetColour( m_color.ToColour() ); colourData.SetColour( m_color.ToColour() );
wxColourDialog* dialog = new wxColourDialog( this, &colourData ); wxColourDialog dialog( this, &colourData );
if( dialog->ShowModal() == wxID_OK ) if( dialog.ShowModal() == wxID_OK )
{ {
newColor = COLOR4D( dialog->GetColourData().GetColour() ); newColor = COLOR4D( dialog.GetColourData().GetColour() );
} }
} }
else else