Skip to content

Commit

Permalink
#4961 NPE on mouse off (needs testing, I can't validate)
Browse files Browse the repository at this point in the history
#4954 User Overlays break with new statsheets
  • Loading branch information
Jmr3366 committed Oct 18, 2024
1 parent 06cdc2d commit 2b9b98b
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import java.io.IOException;
import java.net.URL;
import javafx.application.Platform;
import net.rptools.maptool.client.AppConstants;
import net.rptools.maptool.client.MapTool;
import net.rptools.maptool.model.Token;
import net.rptools.maptool.model.sheet.stats.StatSheetContext;
Expand Down Expand Up @@ -51,15 +50,15 @@ public void setContent(Token token, String content, URL entry, StatSheetLocation
var overlay =
MapTool.getFrame()
.getOverlayPanel()
.getOverlay(AppConstants.INTERNAL_MAP_UNDER_POINTER_HTML_OVERLAY_NAME);
.getOverlay("MapTool Internal Map Under Pointer Overlay");
if (overlay != null) {
overlay.updateContents(output, true);
} else {
MapTool.getFrame()
.getOverlayPanel()
.showOverlay(
AppConstants.INTERNAL_MAP_UNDER_POINTER_HTML_OVERLAY_NAME,
Integer.MIN_VALUE,
"MapTool Internal Map Under Pointer Overlay",
Integer.MAX_VALUE,
output,
null);
}
Expand All @@ -76,8 +75,10 @@ public void clearContent() {
var overlay =
MapTool.getFrame()
.getOverlayPanel()
.getOverlay(AppConstants.INTERNAL_MAP_UNDER_POINTER_HTML_OVERLAY_NAME);
overlay.updateContents("", true);
.getOverlay("MapTool Internal Map Under Pointer Overlay");
if (overlay != null) {
overlay.updateContents("", true);
}
});
}
}

0 comments on commit 2b9b98b

Please sign in to comment.