Fix NPE in ExternalBrowser
This commit is contained in:
parent
f98e01d08c
commit
ec822ec356
|
@ -12,6 +12,7 @@ import java.net.Socket;
|
|||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
|
@ -78,7 +79,7 @@ public class ExternalBrowser implements AutoCloseable {
|
|||
out.write('\n');
|
||||
out.flush();
|
||||
|
||||
onReadyCallback.run();
|
||||
Optional.ofNullable(onReadyCallback).ifPresent(Runnable::run);
|
||||
|
||||
LOG.debug("Waiting for browser to terminate");
|
||||
p.waitFor();
|
||||
|
|
Loading…
Reference in New Issue