Skip to content

Commit

Permalink
Fix crash caused by invalid config file
Browse files Browse the repository at this point in the history
  • Loading branch information
comp500 committed Dec 4, 2021
1 parent c380c71 commit ba11568
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.11.6

# Mod Properties
mod_version = 1.1.0
mod_version = 1.1.1
maven_group = link.infra.borderlessmining
archives_base_name = borderless-mining

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,13 @@ private boolean borderlessmining_setBorderlessFullscreen(boolean newValue) {
borderlessFullscreen = false;
return false;
}
long monitorHandle;
if (ConfigHandler.getInstance().forceWindowMonitor >= monitors.limit()) {
LOGGER.warn("Monitor " + ConfigHandler.getInstance().forceWindowMonitor + " is greater than list size " + monitors.limit() + ", using monitor 0");
monitorHandle = monitors.get(0);
} else {
monitorHandle = monitors.get(ConfigHandler.getInstance().forceWindowMonitor);
}
long monitorHandle = monitors.get(ConfigHandler.getInstance().forceWindowMonitor);
try (MemoryStack stack = MemoryStack.stackPush()) {
IntBuffer xBuf = stack.mallocInt(1);
IntBuffer yBuf = stack.mallocInt(1);
Expand Down

0 comments on commit ba11568

Please sign in to comment.