Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pirvi-public
glfw
Commits
525ad7bf
Commit
525ad7bf
authored
Jan 29, 2018
by
Emmanuel Gil Peyrot
Browse files
Close the libwayland-cursor handle after destroying the cursor theme
Fixes a segfault on glfwTerminate().
parent
eb7c9994
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/wl_init.c
View file @
525ad7bf
...
@@ -827,39 +827,38 @@ int _glfwPlatformInit(void)
...
@@ -827,39 +827,38 @@ int _glfwPlatformInit(void)
void
_glfwPlatformTerminate
(
void
)
void
_glfwPlatformTerminate
(
void
)
{
{
_glfwTerminateEGL
();
_glfwTerminateJoysticksLinux
();
_glfwTerminateJoysticksLinux
();
_glfwTerminateEGL
();
if
(
_glfw
.
wl
.
egl
.
handle
)
{
_glfw_dlclose
(
_glfw
.
wl
.
egl
.
handle
);
_glfw
.
wl
.
egl
.
handle
=
NULL
;
}
#ifdef HAVE_XKBCOMMON_COMPOSE_H
#ifdef HAVE_XKBCOMMON_COMPOSE_H
if
(
_glfw
.
wl
.
xkb
.
composeState
)
if
(
_glfw
.
wl
.
xkb
.
composeState
)
xkb_compose_state_unref
(
_glfw
.
wl
.
xkb
.
composeState
);
xkb_compose_state_unref
(
_glfw
.
wl
.
xkb
.
composeState
);
#endif
#endif
if
(
_glfw
.
wl
.
xkb
.
keymap
)
if
(
_glfw
.
wl
.
xkb
.
keymap
)
xkb_keymap_unref
(
_glfw
.
wl
.
xkb
.
keymap
);
xkb_keymap_unref
(
_glfw
.
wl
.
xkb
.
keymap
);
if
(
_glfw
.
wl
.
xkb
.
state
)
if
(
_glfw
.
wl
.
xkb
.
state
)
xkb_state_unref
(
_glfw
.
wl
.
xkb
.
state
);
xkb_state_unref
(
_glfw
.
wl
.
xkb
.
state
);
if
(
_glfw
.
wl
.
xkb
.
context
)
if
(
_glfw
.
wl
.
xkb
.
context
)
xkb_context_unref
(
_glfw
.
wl
.
xkb
.
context
);
xkb_context_unref
(
_glfw
.
wl
.
xkb
.
context
);
if
(
_glfw
.
wl
.
xkb
.
handle
)
if
(
_glfw
.
wl
.
xkb
.
handle
)
{
{
_glfw_dlclose
(
_glfw
.
wl
.
xkb
.
handle
);
_glfw_dlclose
(
_glfw
.
wl
.
xkb
.
handle
);
_glfw
.
wl
.
xkb
.
handle
=
NULL
;
_glfw
.
wl
.
xkb
.
handle
=
NULL
;
}
}
if
(
_glfw
.
wl
.
egl
.
handle
)
{
if
(
_glfw
.
wl
.
cursorTheme
)
_glfw_dlclose
(
_glfw
.
wl
.
egl
.
handle
);
wl_cursor_theme_destroy
(
_glfw
.
wl
.
cursorTheme
);
_glfw
.
wl
.
egl
.
handle
=
NULL
;
}
if
(
_glfw
.
wl
.
cursor
.
handle
)
if
(
_glfw
.
wl
.
cursor
.
handle
)
{
{
_glfw_dlclose
(
_glfw
.
wl
.
cursor
.
handle
);
_glfw_dlclose
(
_glfw
.
wl
.
cursor
.
handle
);
_glfw
.
wl
.
cursor
.
handle
=
NULL
;
_glfw
.
wl
.
cursor
.
handle
=
NULL
;
}
}
if
(
_glfw
.
wl
.
cursorTheme
)
wl_cursor_theme_destroy
(
_glfw
.
wl
.
cursorTheme
);
if
(
_glfw
.
wl
.
cursorSurface
)
if
(
_glfw
.
wl
.
cursorSurface
)
wl_surface_destroy
(
_glfw
.
wl
.
cursorSurface
);
wl_surface_destroy
(
_glfw
.
wl
.
cursorSurface
);
if
(
_glfw
.
wl
.
compositor
)
if
(
_glfw
.
wl
.
compositor
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment