mirror of
https://github.com/tmux/tmux.git
synced 2025-01-09 17:48:48 +00:00
Don't strdup NULL filename.
This commit is contained in:
parent
88fd1f00b8
commit
4dea352dee
@ -789,7 +789,8 @@ args_make_commands_prepare(struct cmd *self, struct cmdq_item *item, u_int idx,
|
|||||||
if (wait)
|
if (wait)
|
||||||
state->pi.item = item;
|
state->pi.item = item;
|
||||||
cmd_get_source(self, &file, &state->pi.line);
|
cmd_get_source(self, &file, &state->pi.line);
|
||||||
state->pi.file = xstrdup(file);
|
if (file != NULL)
|
||||||
|
state->pi.file = xstrdup(file);
|
||||||
state->pi.c = tc;
|
state->pi.c = tc;
|
||||||
if (state->pi.c != NULL)
|
if (state->pi.c != NULL)
|
||||||
state->pi.c->references++;
|
state->pi.c->references++;
|
||||||
|
Loading…
Reference in New Issue
Block a user