mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-11-16 23:05:58 +01:00
core: Add missing destructors causing segfaults (#199)
Co-authored-by: Staz M <staz@staz.io>
This commit is contained in:
parent
23224d40e4
commit
2ae79757d5
3 changed files with 10 additions and 0 deletions
|
@ -69,6 +69,12 @@ CEGL::CEGL(wl_display* display) {
|
|||
|
||||
error:
|
||||
eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
}
|
||||
|
||||
CEGL::~CEGL() {
|
||||
if (eglContext != EGL_NO_CONTEXT)
|
||||
eglDestroyContext(eglDisplay, eglContext);
|
||||
|
||||
if (eglDisplay)
|
||||
eglTerminate(eglDisplay);
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
class CEGL {
|
||||
public:
|
||||
CEGL(wl_display*);
|
||||
~CEGL();
|
||||
|
||||
EGLDisplay eglDisplay;
|
||||
EGLConfig eglConfig;
|
||||
|
|
|
@ -519,6 +519,9 @@ void CHyprlock::run() {
|
|||
|
||||
m_vOutputs.clear();
|
||||
g_pEGL.reset();
|
||||
g_pRenderer = nullptr;
|
||||
|
||||
xkb_context_unref(m_pXKBContext);
|
||||
|
||||
wl_display_disconnect(m_sWaylandState.display);
|
||||
|
||||
|
|
Loading…
Reference in a new issue