summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
Diffstat (limited to 'archival')
-rw-r--r--archival/tar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 5994d89..399302b 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -860,7 +860,7 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
applet_long_options = tar_longopts;
#endif
#if ENABLE_DESKTOP
- if (argv[1][0] != '-') {
+ if (argv[1] && argv[1][0] != '-') {
/* Compat:
* 1st argument without dash handles options with parameters
* differently from dashed one: it takes *next argv[i]*