Fix potential crash when opening the colorpicker dialog caused by use of an uninitialized variable

Originally committed to SVN as r5743.
This commit is contained in:
Thomas Goyne 2011-10-17 17:52:40 +00:00
parent 8daa6cfdc2
commit 04e385b4d5

View file

@ -928,6 +928,7 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, wxColour initial_color, C
hsv_slider = new wxBitmap(sliderimg);
// Create the controls for the dialog
updating_controls = true;
wxSizer *spectrum_box = new wxStaticBoxSizer(wxVERTICAL, this, _("Colour spectrum"));
spectrum = new ColorPickerSpectrum(this, SELECTOR_SPECTRUM, 0, -1, -1, ColorPickerSpectrum::HorzVert, wxSize(256, 256));
slider = new ColorPickerSpectrum(this, SELECTOR_SLIDER, 0, -1, -1, ColorPickerSpectrum::Vert, wxSize(slider_width, 256));