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
|
void
|
||||||
selectitem(const Arg *arg)
|
selectitem(const Arg *arg)
|
||||||
{
|
{
|
||||||
char *selection;
|
if (!text)
|
||||||
|
|
||||||
if (arg->i)
|
|
||||||
selection = sel->text;
|
|
||||||
else
|
|
||||||
selection = text;
|
|
||||||
|
|
||||||
if (!sel)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
puts(selection);
|
puts(text);
|
||||||
savehistory(selection);
|
savehistory(text);
|
||||||
|
|
||||||
cleanup();
|
cleanup();
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue