diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-11-04 10:41:47 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-11-04 09:44:48 +0000 |
commit | 215fe3b16d35f3a597658fd378d35bdb56116267 (patch) | |
tree | 2017dfd889e8137bec22976fbd61c7e2bafc5f26 /src/core | |
parent | f05d65a3c5e85751062fe08bceab0907f6994b2f (diff) |
Fix build on Windows
We can't delete a scoped_refptr, but just returning should cause it
to do so automatically.
Change-Id: I7d7ba28d0264506d608f64847cbfb8a7cb63cf5e
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/gl_context_qt.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/gl_context_qt.cpp b/src/core/gl_context_qt.cpp index 3a6de6935..3c3b8225d 100644 --- a/src/core/gl_context_qt.cpp +++ b/src/core/gl_context_qt.cpp @@ -148,10 +148,8 @@ scoped_refptr<GLContext> GLContext::CreateGLContext(GLShareGroup* share_group, G scoped_refptr<GLContext> context; if (GetGLImplementation() == kGLImplementationDesktopGL) { context = new GLContextWGL(share_group); - if (!context->Initialize(compatible_surface, gpu_preference)) { - delete context; + if (!context->Initialize(compatible_surface, gpu_preference)) return nullptr; - } return context; } else { context = new GLContextEGL(share_group); |