Fix T101974: Potential memoryleak GHOST_WindowWayland.newDrawingContext
Reviewed By: jbakker Maniphest Tasks: T101974 Differential Revision: https://developer.blender.org/D16309
This commit is contained in:
parent
ec60c8abe7
commit
4776a74bf7
Notes:
blender-bot
2023-02-14 00:57:33 +01:00
Referenced by issue #101974, Potential memoryleak `GHOST_WindowWayland.newDrawingContext`.
|
@ -946,7 +946,12 @@ GHOST_Context *GHOST_WindowWayland::newDrawingContext(GHOST_TDrawingContextType
|
|||
EGL_OPENGL_API);
|
||||
}
|
||||
|
||||
return (context->initializeDrawingContext() == GHOST_kSuccess) ? context : nullptr;
|
||||
if (context->initializeDrawingContext()) {
|
||||
return context;
|
||||
}
|
||||
|
||||
delete context;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
Loading…
Reference in New Issue