assigning line marker to itself shouldn't invalidate it, add self-assignment check
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -39,14 +39,16 @@ public:
|
||||
~LineMarker() {
|
||||
delete pxpm;
|
||||
}
|
||||
LineMarker &operator=(const LineMarker &) {
|
||||
LineMarker &operator=(const LineMarker &other) {
|
||||
// Defined to avoid pxpm being blindly copied, not as real assignment operator
|
||||
markType = SC_MARK_CIRCLE;
|
||||
fore = ColourDesired(0,0,0);
|
||||
back = ColourDesired(0xff,0xff,0xff);
|
||||
alpha = SC_ALPHA_NOALPHA;
|
||||
delete pxpm;
|
||||
pxpm = NULL;
|
||||
if ( &other != this ) {
|
||||
markType = SC_MARK_CIRCLE;
|
||||
fore = ColourDesired(0,0,0);
|
||||
back = ColourDesired(0xff,0xff,0xff);
|
||||
alpha = SC_ALPHA_NOALPHA;
|
||||
delete pxpm;
|
||||
pxpm = NULL;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
void RefreshColourPalette(Palette &pal, bool want);
|
||||
|
Reference in New Issue
Block a user