diff options
author | nicm <nicm> | 2021-08-12 08:10:20 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-08-12 08:10:20 +0000 |
commit | 26773ea9efd3b555833618719446309cf7a024de (patch) | |
tree | 1e0db1852415c57cf7a542253bfcdb38c98479b9 /notify.c | |
parent | 163908fe8a0af8cf2d24510415bd4f81ace3a4d1 (diff) | |
download | rtmux-26773ea9efd3b555833618719446309cf7a024de.tar.gz rtmux-26773ea9efd3b555833618719446309cf7a024de.tar.bz2 rtmux-26773ea9efd3b555833618719446309cf7a024de.zip |
Do not dereference pane when it is NULL, fixes a crash when creating a
hook from the config, GitHub issue 2820.
Diffstat (limited to 'notify.c')
-rw-r--r-- | notify.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -200,7 +200,7 @@ notify_hook(struct cmdq_item *item, const char *name) ne.client = cmdq_get_client(item); ne.session = target->s; ne.window = target->w; - ne.pane = target->wp->id; + ne.pane = (target->wp != NULL ? target->wp->id : -1); ne.formats = format_create(NULL, NULL, 0, FORMAT_NOJOBS); format_add(ne.formats, "hook", "%s", name); |