summaryrefslogtreecommitdiff
path: root/src/actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/actions.c b/src/actions.c
index b88ce85..3cb5e9a 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -549,6 +549,10 @@ cmd_select (int interactive, void *data)
else
str = strdup ((char *) data);
+ /* User aborted. */
+ if (str == NULL)
+ return NULL;
+
/* Only search if the string contains something to search for. */
if (strlen (str) > 0)
{
@@ -597,6 +601,10 @@ cmd_rename (int interactive, void *data)
else
winname = strdup ((char *) data);
+ /* User aborted. */
+ if (winname == NULL)
+ return NULL;
+
if (*winname)
{
free (current_window()->name);
@@ -717,6 +725,10 @@ cmd_colon (int interactive, void *data)
else
input = get_more_input (MESSAGE_PROMPT_COMMAND, data);
+ /* User aborted. */
+ if (input == NULL)
+ return NULL;
+
result = command (1, input);
/* Gobble the result. */
@@ -738,6 +750,10 @@ cmd_exec (int interactive, void *data)
else
cmd = strdup ((char *) data);
+ /* User aborted. */
+ if (cmd == NULL)
+ return NULL;
+
spawn (cmd);
free (cmd);
@@ -782,6 +798,10 @@ cmd_newwm(int interactive, void *data)
else
prog = strdup ((char *) data);
+ /* User aborted. */
+ if (prog == NULL)
+ return NULL;
+
PRINT_DEBUG ("Switching to %s\n", prog);
putenv(DisplayString(dpy));