diff options
author | David Robillard <d@drobilla.net> | 2023-02-15 21:34:53 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-02-15 21:51:14 -0500 |
commit | c1981dac09e9f630a51dcce4502619dc84474266 (patch) | |
tree | 7696aa59b729b75e40a03169b9180c1723d33335 | |
parent | 609aed744bf205c992a10dab79109e3d6df1991d (diff) | |
download | pugl-c1981dac09e9f630a51dcce4502619dc84474266.tar.gz pugl-c1981dac09e9f630a51dcce4502619dc84474266.tar.bz2 pugl-c1981dac09e9f630a51dcce4502619dc84474266.zip |
Fix crash on views with no title set
-rw-r--r-- | src/x11.c | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -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; } |