Code

screen_queue: re-add NULL check
authorMax Kellermann <max.kellermann@gmail.com>
Wed, 2 Aug 2017 07:40:14 +0000 (09:40 +0200)
committerMax Kellermann <max.kellermann@gmail.com>
Wed, 2 Aug 2017 07:40:14 +0000 (09:40 +0200)
It accidently got lost in 885d6cf20ac418dacdf999f7cbdfc684fdc3e735

src/screen_queue.c

index 7bb30aefd79973a292d74c63a5739fd97ae3f763..dd27df04cce48fd6c1fd5a6ea9dc581aed72021c 100644 (file)
@@ -378,7 +378,10 @@ screen_queue_exit(void)
 static const char *
 screen_queue_title(char *str, size_t size)
 {
-       g_snprintf(str, size, _("Queue on %s"), queue_screen.connection_name);
+       if (queue_screen.connection_name == NULL)
+              return _("Queue");
+
+       g_snprintf(str, size, _("Queue on %s"), queue_screen.connection_name);
        return str;
 }