Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorAnton Raves <Memento>2022-10-27 22:29:03 +0300
committerRay Molenkamp <github@lazydodo.com>2022-10-27 22:29:03 +0300
commit7c3cd63f95f8cb54aece57b4a4788abd10a11253 (patch)
treee639b9883d09090c6d79d868905a01f9208ab747 /intern
parentc967bdcbb1e8496c1e0d440aebb4bab97ad4508b (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')
-rw-r--r--intern/ghost/intern/GHOST_SystemWayland.cpp6
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);