fix: segmentation fault

This commit is contained in:
speedie 2023-02-10 21:27:02 +01:00
parent d9f88e5ee3
commit 4ef9075dbe

View file

@ -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);
}