fix: segmentation fault
This commit is contained in:
parent
d9f88e5ee3
commit
4ef9075dbe
14
spmenu.c
14
spmenu.c
|
@ -889,18 +889,12 @@ backspace(const Arg *arg)
|
|||
void
|
||||
selectitem(const Arg *arg)
|
||||
{
|
||||
char *selection;
|
||||
|
||||
if (arg->i)
|
||||
selection = sel->text;
|
||||
else
|
||||
selection = text;
|
||||
|
||||
if (!sel)
|
||||
if (!text)
|
||||
return;
|
||||
|
||||
puts(selection);
|
||||
savehistory(selection);
|
||||
puts(text);
|
||||
savehistory(text);
|
||||
|
||||
cleanup();
|
||||
exit(0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue