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() {
|
~LineMarker() {
|
||||||
delete pxpm;
|
delete pxpm;
|
||||||
}
|
}
|
||||||
LineMarker &operator=(const LineMarker &) {
|
LineMarker &operator=(const LineMarker &other) {
|
||||||
// Defined to avoid pxpm being blindly copied, not as real assignment operator
|
// Defined to avoid pxpm being blindly copied, not as real assignment operator
|
||||||
markType = SC_MARK_CIRCLE;
|
if ( &other != this ) {
|
||||||
fore = ColourDesired(0,0,0);
|
markType = SC_MARK_CIRCLE;
|
||||||
back = ColourDesired(0xff,0xff,0xff);
|
fore = ColourDesired(0,0,0);
|
||||||
alpha = SC_ALPHA_NOALPHA;
|
back = ColourDesired(0xff,0xff,0xff);
|
||||||
delete pxpm;
|
alpha = SC_ALPHA_NOALPHA;
|
||||||
pxpm = NULL;
|
delete pxpm;
|
||||||
|
pxpm = NULL;
|
||||||
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
void RefreshColourPalette(Palette &pal, bool want);
|
void RefreshColourPalette(Palette &pal, bool want);
|
||||||
|
Reference in New Issue
Block a user