diff options
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r-- | src/opengl/qgl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index edda6b6..7211309 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1578,8 +1578,8 @@ Q_OPENGL_EXPORT QGLShareRegister* qgl_share_reg() */ QGLContext::QGLContext(const QGLFormat &format, QPaintDevice *device) + : d_ptr(new QGLContextPrivate(this)) { - d_ptr = new QGLContextPrivate(this); Q_D(QGLContext); d->init(device, format); } @@ -1601,8 +1601,8 @@ QGLContext::QGLContext(const QGLFormat &format, QPaintDevice *device) \sa format(), isValid() */ QGLContext::QGLContext(const QGLFormat &format) + : d_ptr(new QGLContextPrivate(this)) { - d_ptr = new QGLContextPrivate(this); Q_D(QGLContext); d->init(0, format); } @@ -1620,7 +1620,6 @@ QGLContext::~QGLContext() QGLSignalProxy::instance()->emitAboutToDestroyContext(this); reset(); - delete d; } void QGLContextPrivate::cleanup() |