From c1981dac09e9f630a51dcce4502619dc84474266 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 15 Feb 2023 21:34:53 -0500 Subject: Fix crash on views with no title set --- src/x11.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/x11.c b/src/x11.c index 6c39cce..67d579a 100644 --- a/src/x11.c +++ b/src/x11.c @@ -1891,15 +1891,17 @@ puglViewStringChanged(PuglView* const view, break; case PUGL_WINDOW_TITLE: - XStoreName(display, view->impl->win, value); - XChangeProperty(display, - view->impl->win, - atoms->NET_WM_NAME, - atoms->UTF8_STRING, - 8, - PropModeReplace, - (const uint8_t*)value, - (int)strlen(value)); + if (value) { + XStoreName(display, view->impl->win, value); + XChangeProperty(display, + view->impl->win, + atoms->NET_WM_NAME, + atoms->UTF8_STRING, + 8, + PropModeReplace, + (const uint8_t*)value, + (int)strlen(value)); + } break; } -- cgit v1.2.1