core: deregister xerror handler in session_destroy

xerror handler might be called during XCloseDisplay, at which point
session_t is already destroyed, causing a segfault.

Ping #209

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-07-30 06:40:18 +01:00
parent d7415fcf2e
commit 6cb5f9711e
2 changed files with 5 additions and 1 deletions

View File

@ -153,6 +153,8 @@ typedef struct session {
// === Display related ===
/// Display in use.
Display *dpy;
/// Previous handler of X errors
XErrorHandler previous_xerror_handler;
/// Default screen.
int scr;
/// XCB connection.