diff options
author | Anton Raves <Memento> | 2022-10-27 22:29:03 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2022-10-27 22:29:03 +0300 |
commit | 7c3cd63f95f8cb54aece57b4a4788abd10a11253 (patch) | |
tree | e639b9883d09090c6d79d868905a01f9208ab747 /intern/ghost | |
parent | c967bdcbb1e8496c1e0d440aebb4bab97ad4508b (diff) |
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.
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWayland.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index d4eabfb815d..0f609395124 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -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); |