Skip to content

Commit 215fe3b

Browse files
committed
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 <[email protected]>
1 parent f05d65a commit 215fe3b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/core/gl_context_qt.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,8 @@ scoped_refptr<GLContext> GLContext::CreateGLContext(GLShareGroup* share_group, G
148148
scoped_refptr<GLContext> context;
149149
if (GetGLImplementation() == kGLImplementationDesktopGL) {
150150
context = new GLContextWGL(share_group);
151-
if (!context->Initialize(compatible_surface, gpu_preference)) {
152-
delete context;
151+
if (!context->Initialize(compatible_surface, gpu_preference))
153152
return nullptr;
154-
}
155153
return context;
156154
} else {
157155
context = new GLContextEGL(share_group);

0 commit comments

Comments
 (0)