We need to check for a valid channel_target pointer to handle the case
when a user missed to provide a channel name.
This fixes bug #1515.
Signed-off-by: Wolfram Sang <redacted>
g_hash_table_iter_init(&iter, channel_map);
while (g_hash_table_iter_next(&iter, &channel_id, &channel_target)) {
+ if (!channel_target) {
+ g_printerr("cli: Channel name for \"%s\" missing.\n",
+ (char *)channel_id);
+ continue;
+ }
ch = find_channel(channel_list, channel_target);
if (!ch) {
g_printerr("cli: No channel with name \"%s\" found.\n",