summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-08-24 20:29:35 +0200
committerOlivier Goffart <ogoffart@trolltech.com>2009-08-25 10:36:35 +0200
commit5e43eb85043395655155edb5206de15024e3fb71 (patch)
tree106e2dd174b2bb7972ce16aebad0a7171d941df8 /src
parent3636e666528b72de79f8c7012690bb9e279f0863 (diff)
Memory leak in QBrush
QScopedPointer would not cleanup the old object if it is the same as the new one. But operator= does increment the reference count even if they were the same Reviewed-by: Harald Fernengel
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qbrush.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index a52a270ac..b7179a422 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -625,7 +625,7 @@ void QBrush::detach(Qt::BrushStyle newStyle)
QBrush &QBrush::operator=(const QBrush &b)
{
- if (this == &b)
+ if (d == b.d)
return *this;
b.d->ref.ref();