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
Notes:
blender-bot
2023-02-14 03:46:57 +01:00
Referenced by issue #102085, X11 Startup Crash
|
@ -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…
Reference in New Issue