From 9f0b20e17091615022183b2cc8685e918b54b9e9 Mon Sep 17 00:00:00 2001 From: Phergus <34379254+Phergus@users.noreply.github.com> Date: Mon, 18 Oct 2021 19:58:06 -0600 Subject: [PATCH] Fix for NPE on exit with no connection Fixed logic error and updated changelog for bug fix release 1.10.3. --- CHANGE_LOG.md | 9 ++++++--- src/main/java/net/rptools/maptool/client/MapTool.java | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGE_LOG.md b/CHANGE_LOG.md index 64595a22bb..0f65047864 100644 --- a/CHANGE_LOG.md +++ b/CHANGE_LOG.md @@ -1,4 +1,9 @@ +# MapTool 1.10.3 +## Bug Fixes +- [#3074][i3074] Fix NPE crash on exit when connection hasn't been established. + # MapTool 1.10.2 +## Bug Fixes - [#3037][i3037] Fix webp images for getTokenImage(), tblImg() etc.. @@ -11,9 +16,6 @@ - Translation updates - - - # MapTool 1.10.0 @@ -86,6 +88,7 @@ Feature release using OpenJDK 16. [Change Log for 1.9.3](https://github.com/RPTools/maptool/blob/1.9.3/CHANGE_LOG.md) +[i3074]: https://github.com/RPTools/maptool/issues/3074 [i3025]: https://github.com/RPTools/maptool/issues/3025 [i3023]: https://github.com/RPTools/maptool/issues/3023 [i3017]: https://github.com/RPTools/maptool/issues/3017 diff --git a/src/main/java/net/rptools/maptool/client/MapTool.java b/src/main/java/net/rptools/maptool/client/MapTool.java index d646ddb79d..d684deb543 100644 --- a/src/main/java/net/rptools/maptool/client/MapTool.java +++ b/src/main/java/net/rptools/maptool/client/MapTool.java @@ -1265,7 +1265,7 @@ public static void disconnect() { } try { - if (conn != null || conn.isAlive()) { + if (conn != null && conn.isAlive()) { conn.close(); } } catch (IOException ioe) {