]> git.tue.mpg.de Git - paraslash.git/commitdiff
afs: Improve error message in init_admissible_files().
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 29 Apr 2023 18:08:38 +0000 (20:08 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 10 May 2023 16:52:51 +0000 (18:52 +0200)
arg may well be NULL here, so print "dummy" in this case.

afs.c

diff --git a/afs.c b/afs.c
index 000aaa54670714a195a6d8bce3e12f3f723017dc..78e42eaec54b9a1cbb87a3c349a0fa12ae98601f 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -529,8 +529,8 @@ static void init_admissible_files(const char *arg)
 {
        int ret = activate_mood_or_playlist(arg, NULL);
        if (ret < 0) {
-               PARA_WARNING_LOG("could not activate %s: %s\n", arg,
-                       para_strerror(-ret));
+               PARA_WARNING_LOG("could not activate %s: %s\n", arg?
+                       arg : "dummy", para_strerror(-ret));
                if (arg)
                        activate_mood_or_playlist(NULL, NULL);
        }