summaryrefslogtreecommitdiff
path: root/src/add.c
diff options
context:
space:
mode:
authorLinux User <ncopa@alpine-netbook.(none)>2009-05-21 20:24:07 +0000
committerLinux User <ncopa@alpine-netbook.(none)>2009-05-21 20:24:07 +0000
commit651aa71ac2dfc6d3c78e106cacb8fa699095f845 (patch)
tree526ccf7ce042f6c5d2cb216dccda29f5e777be6e /src/add.c
parent0906a1c7de37ba54f29e9dbabbbd5ea069258cef (diff)
downloadapk-tools-651aa71ac2dfc6d3c78e106cacb8fa699095f845.tar.gz
apk-tools-651aa71ac2dfc6d3c78e106cacb8fa699095f845.tar.bz2
apk-tools-651aa71ac2dfc6d3c78e106cacb8fa699095f845.tar.xz
apk-tools-651aa71ac2dfc6d3c78e106cacb8fa699095f845.zip
add: fix segfault when no params are given
Diffstat (limited to 'src/add.c')
-rw-r--r--src/add.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/add.c b/src/add.c
index 06b06f7..f75a4b7 100644
--- a/src/add.c
+++ b/src/add.c
@@ -60,7 +60,8 @@ static int add_main(void *ctx, int argc, char **argv)
struct apk_dependency virtdep;
int i, r;
- if (strcmp(argv[0], "starwars") == 0)
+ if ((argc > 0) && (apk_verbosity > 1) &&
+ (strcmp(argv[0], "starwars") == 0))
return system("telnet towel.blinkenlights.nl");
r = apk_db_open(&db, apk_root, actx->open_flags | APK_OPENF_WRITE);