diff --git a/changelog.md b/changelog.md index cfd9d8a6d8..7ecb97c8bb 100644 --- a/changelog.md +++ b/changelog.md @@ -28,6 +28,7 @@ * Changed: The game now crashes instead of reloading defaults if a config file is present but invalid. * Fixed: [#3588] Renaming over other files does not properly free space. * Fixed: [#3591] Memory leak with wrapped worlds from other mods. +* Fixed: [#3596] Freeze when connecting a ComputerCraft peripheral via an Adapter (Kosmos-Prime) * Fixed: [#3603] computer.getDeviceInfo doesn't pause the computer immediately (AR2000AR) * Fixed: [#3609] Swapped arguments in a graphics card "bitblt()" edge case. (Kosmos-Prime) * Removed: Native Lua library support for x86 (32-bit) macOS. diff --git a/src/main/scala/li/cil/oc/integration/computercraft/DriverPeripheral.java b/src/main/scala/li/cil/oc/integration/computercraft/DriverPeripheral.java index a4368d2193..65082f6df6 100644 --- a/src/main/scala/li/cil/oc/integration/computercraft/DriverPeripheral.java +++ b/src/main/scala/li/cil/oc/integration/computercraft/DriverPeripheral.java @@ -123,7 +123,7 @@ public Object[] invoke(final String method, final Context context, final Argumen @Override public void onConnect(final Node node) { super.onConnect(node); - if (node.host() instanceof Context) { + if (node.host() instanceof Context && !accesses.containsKey(node.address())) { final FakeComputerAccess access = new FakeComputerAccess(this, (Context) node.host()); accesses.put(node.address(), access); peripheral.attach(access);