Don’t access optional that’s clearly not set.
[xudocci.git] / src / main / java / net / pterodactylus / xdcc / core / Core.java
index c2eaae8..3b1e639 100644 (file)
@@ -631,7 +631,7 @@ public class Core extends AbstractExecutionThreadService {
 
                Optional<Channel> channel = getChannel(network.get(), channelNotJoined.channel());
                if (!channel.isPresent()) {
-                       eventBus.post(new GenericMessage(format("Could not join %s but didn’t try to join, either.", channel.get())));
+                       eventBus.post(new GenericMessage(format("Could not join %s but didn’t try to join, either.", channelNotJoined.channel())));
                        return;
                }