Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/laige-render/gl_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,15 @@ struct GlContext::Impl {
if (egl.destroyDisplay != nullptr && eglDisplay != nullptr) {
egl.destroyDisplay(eglDisplay);
}
// libEGL is dlopened only on the Linux headless path (createHeadless
// #else branch); on Windows/macOS eglHandle is always null and
// <dlfcn.h> is not included (see the include guard above), so the
// close is compiled only where the handle can exist.
#if !defined(__APPLE__) && !defined(_WIN32)
if (eglHandle != nullptr) {
dlclose(eglHandle);
}
#endif
} else {
if (window != nullptr) {
glfwDestroyWindow(window); // destroys the context with it
Expand Down
Loading