fix NPE in MultiplayerManager

This commit is contained in:
Glavo authored and Yuhui Huang committed 2021-12-18 15:39:57 +08:00
1 parent 113f4f948b
commit eac8896f3e
1 file changed
+2 -1
@@ -400,7 +400,8 @@ public final class MultiplayerManager {
onExit.fireEvent(new CatoExitEvent(this, CatoExitEvent.EXIT_CODE_INTERRUPTED));
} finally {
try {
writer.close();
if (writer != null)
writer.close();
} catch (IOException e) {
LOG.log(Level.WARNING, "Failed to close cato stdin writer", e);
}