x11display: Attempt to fix crash on shutdown with custom cursor
This commit is contained in:
parent
1867094afe
commit
6404704ee3
|
|
@ -130,12 +130,6 @@ x11GraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe,
|
|||
*/
|
||||
x11GraphicsWindow::
|
||||
~x11GraphicsWindow() {
|
||||
if (!_cursor_filenames.empty()) {
|
||||
LightReMutexHolder holder(x11GraphicsPipe::_x_mutex);
|
||||
for (auto item : _cursor_filenames) {
|
||||
XFreeCursor(_display, item.second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1031,6 +1025,10 @@ close_window() {
|
|||
_orig_size_id = -1;
|
||||
}
|
||||
|
||||
for (auto item : _cursor_filenames) {
|
||||
XFreeCursor(_display, item.second);
|
||||
}
|
||||
|
||||
GraphicsWindow::close_window();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue