summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsabetts <sabetts>2004-10-05 23:29:39 +0000
committersabetts <sabetts>2004-10-05 23:29:39 +0000
commitd2db60569c8f9f2d3439edc9eee4f9330a317023 (patch)
tree32b324b0134e644b3480b16c653b0172a102a4ea /src
parenta2aeb8461a435621330a692998237f259c356640 (diff)
downloadratpoison-d2db60569c8f9f2d3439edc9eee4f9330a317023.zip
* src/actions.c (cmd_source): display an error message if no file is supplied.
Diffstat (limited to 'src')
-rw-r--r--src/actions.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/actions.c b/src/actions.c
index 9c97332..143f965 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -797,6 +797,12 @@ cmd_source (int interactive, char *data)
{
FILE *fileptr;
+ if (data == NULL)
+ {
+ message (" source: one argument required ");
+ return NULL;
+ }
+
if ((fileptr = fopen (data, "r")) == NULL)
marked_message_printf (0, 0, " source: %s : %s ", data, strerror(errno));
else