mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
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::
|
||||||
~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;
|
_orig_size_id = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (auto item : _cursor_filenames) {
|
||||||
|
XFreeCursor(_display, item.second);
|
||||||
|
}
|
||||||
|
|
||||||
GraphicsWindow::close_window();
|
GraphicsWindow::close_window();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user