summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorVadim Zakondyrin <thekondr@crystalnix.com>2012-11-17 13:25:06 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-17 20:11:38 (GMT)
commitd74dbaaa325e5937485a9b3cdcadb55f2ecc111a (patch)
treeafaeea9d190e876e7582d50f2d8b06760babe398 /src/opengl
parentdd95ad45ad228cebd5c067a60859b45e569dca5f (diff)
downloadQt-d74dbaaa325e5937485a9b3cdcadb55f2ecc111a.zip
Qt-d74dbaaa325e5937485a9b3cdcadb55f2ecc111a.tar.gz
Qt-d74dbaaa325e5937485a9b3cdcadb55f2ecc111a.tar.bz2
Fixed memory leak in assign operator of QGLBuffer
Change-Id: I90b7e3f352fb7ceea7befabbab7d3b67213dd45f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qglbuffer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/opengl/qglbuffer.cpp b/src/opengl/qglbuffer.cpp
index ad42896..b52e4d0 100644
--- a/src/opengl/qglbuffer.cpp
+++ b/src/opengl/qglbuffer.cpp
@@ -208,8 +208,10 @@ QGLBuffer &QGLBuffer::operator=(const QGLBuffer &other)
{
if (d_ptr != other.d_ptr) {
other.d_ptr->ref.ref();
- if (!d_ptr->ref.deref())
+ if (!d_ptr->ref.deref()) {
destroy();
+ delete d_ptr;
+ }
d_ptr = other.d_ptr;
}
return *this;