]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - audiod_command.c
audiod get_play_time_slot_num(): Avoid possible NULL pointer dereference.
[paraslash.git] / audiod_command.c
index 05059ac06d2ff7f23a9648e14e54c71c904bfa9d..a0d0229d6973566296f0fc18b1aa987aacfd4c98 100644 (file)
@@ -198,7 +198,7 @@ static int get_play_time_slot_num(void)
        FOR_EACH_SLOT(i) {
                struct slot_info *s = &slot[i];
                struct timeval wstime;
-               if (!s->wns)
+               if (!s->wns || !s->wns[0].btrn)
                        continue;
                btr_get_node_start(s->wns[0].btrn, &wstime);
                if (oldest_slot >= 0 && tv_diff(&wstime, &oldest_wstime, NULL) > 0)