mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix T102085: X11 Startup crash
wl_registry_destroy does not enjoy being fed a null pointer. Added a null check to keep it out of trouble.
This commit is contained in:
parent
c967bdcbb1
commit
7c3cd63f95
1 changed files with 4 additions and 2 deletions
|
|
@ -806,8 +806,10 @@ struct GWL_Display {
|
|||
|
||||
static void gwl_display_destroy(GWL_Display *display)
|
||||
{
|
||||
wl_registry_destroy(display->wl_registry);
|
||||
display->wl_registry = nullptr;
|
||||
if (display->wl_registry) {
|
||||
wl_registry_destroy(display->wl_registry);
|
||||
display->wl_registry = nullptr;
|
||||
}
|
||||
|
||||
/* Unregister items in reverse order. */
|
||||
gwl_registry_entry_remove_all(display);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue