From 689549bb1f85f2ff7e1710d527dc2ead4cb3bb5b Mon Sep 17 00:00:00 2001 From: Jack Wilsdon Date: Mon, 28 Oct 2024 17:52:09 +0000 Subject: osc: notify: fix crash with no message Closes #1866 --- osc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'osc.c') diff --git a/osc.c b/osc.c index 5efc7588..535e29c8 100644 --- a/osc.c +++ b/osc.c @@ -557,9 +557,13 @@ osc_notify(struct terminal *term, char *string) return; } + char *msgdup = NULL; + if (msg != NULL) + msgdup = xstrdup(msg); + notify_notify(term, &(struct notification){ .title = xstrdup(title), - .body = xstrdup(msg), + .body = msgdup, .expire_time = -1, .focus = true, }); -- cgit v1.3